mirror of
https://github.com/kvazar-network/keva-stratum.git
synced 2025-01-11 15:48:00 +00:00
Fix Web-UI
This commit is contained in:
parent
89a8c4ac98
commit
8e8346195a
@ -5,6 +5,10 @@
|
||||
|
||||
"threads": 2,
|
||||
|
||||
"estimationWindow": "15m",
|
||||
"luckWindow": "24h",
|
||||
"largeLuckWindow": "72h",
|
||||
|
||||
"stratum": {
|
||||
"timeout": "15m",
|
||||
"blockRefreshInterval": "1s",
|
||||
|
@ -6,6 +6,7 @@ type Config struct {
|
||||
BypassShareValidation bool `json:"bypassShareValidation"`
|
||||
Stratum Stratum `json:"stratum"`
|
||||
Daemon Daemon `json:"daemon"`
|
||||
EstimationWindow string `json:"estimationWindow"`
|
||||
LuckWindow string `json:"luckWindow"`
|
||||
LargeLuckWindow string `json:"largeLuckWindow"`
|
||||
Threads int `json:"threads"`
|
||||
|
@ -56,6 +56,14 @@ func NewStratum(cfg *pool.Config) *StratumServer {
|
||||
timeout, _ := time.ParseDuration(cfg.Stratum.Timeout)
|
||||
stratum.timeout = timeout
|
||||
|
||||
estimationWindow, _ := time.ParseDuration(cfg.EstimationWindow)
|
||||
stratum.estimationWindow = estimationWindow
|
||||
|
||||
luckWindow, _ := time.ParseDuration(cfg.LuckWindow)
|
||||
stratum.luckWindow = int64(luckWindow / time.Millisecond)
|
||||
luckLargeWindow, _ := time.ParseDuration(cfg.LargeLuckWindow)
|
||||
stratum.luckLargeWindow = int64(luckLargeWindow / time.Millisecond)
|
||||
|
||||
// Init block template
|
||||
stratum.refreshBlockTemplate(false)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user