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