Precalculate index stats

This commit is contained in:
Pijus Kamandulis
2025-06-23 17:52:20 +03:00
parent d801debaf6
commit be637f4540
13 changed files with 243 additions and 81 deletions

View File

@@ -29,10 +29,11 @@ type ShareLog struct {
Agent string `json:"agent"` // Miner agent string (e.g., bitaxe/BM1370)
}
type ShareStat struct {
Label string
Diff string
Time string
type TimeWindowHighShare struct {
TimeWindowID string `json:"time_window_id"` // Unique ID for the time window
TimeWindowName string `json:"time_window_name"` // Name of the time window (e.g., "Past Hour")
SDiff float64 `json:"share_diff"` // Difficulty of the highest share
Time string `json:"share_time"` // Time of the highest share
}
// ParseCreateDate can be used to convert ShareLog.CreateDate to time.Time