mirror of
https://github.com/kvazar-network/keva-stratum.git
synced 2025-01-11 15:48:00 +00:00
Move blockRefreshInterval setting
This commit is contained in:
parent
2c1da85ee0
commit
ae8a837e73
@ -9,9 +9,10 @@
|
|||||||
"luckWindow": "24h",
|
"luckWindow": "24h",
|
||||||
"largeLuckWindow": "72h",
|
"largeLuckWindow": "72h",
|
||||||
|
|
||||||
|
"blockRefreshInterval": "1s",
|
||||||
|
|
||||||
"stratum": {
|
"stratum": {
|
||||||
"timeout": "15m",
|
"timeout": "15m",
|
||||||
"blockRefreshInterval": "1s",
|
|
||||||
|
|
||||||
"listen": [
|
"listen": [
|
||||||
{
|
{
|
||||||
|
@ -5,6 +5,7 @@ type Config struct {
|
|||||||
BypassAddressValidation bool `json:"bypassAddressValidation"`
|
BypassAddressValidation bool `json:"bypassAddressValidation"`
|
||||||
BypassShareValidation bool `json:"bypassShareValidation"`
|
BypassShareValidation bool `json:"bypassShareValidation"`
|
||||||
Stratum Stratum `json:"stratum"`
|
Stratum Stratum `json:"stratum"`
|
||||||
|
BlockRefreshInterval string `json:"blockRefreshInterval"`
|
||||||
UpstreamCheckInterval string `json:"upstreamCheckInterval"`
|
UpstreamCheckInterval string `json:"upstreamCheckInterval"`
|
||||||
Upstream []Upstream `json:"upstream"`
|
Upstream []Upstream `json:"upstream"`
|
||||||
EstimationWindow string `json:"estimationWindow"`
|
EstimationWindow string `json:"estimationWindow"`
|
||||||
@ -19,9 +20,8 @@ type Config struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Stratum struct {
|
type Stratum struct {
|
||||||
Timeout string `json:"timeout"`
|
Timeout string `json:"timeout"`
|
||||||
BlockRefreshInterval string `json:"blockRefreshInterval"`
|
Ports []Port `json:"listen"`
|
||||||
Ports []Port `json:"listen"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Port struct {
|
type Port struct {
|
||||||
|
@ -80,7 +80,7 @@ func NewStratum(cfg *pool.Config) *StratumServer {
|
|||||||
// Init block template
|
// Init block template
|
||||||
stratum.refreshBlockTemplate(false)
|
stratum.refreshBlockTemplate(false)
|
||||||
|
|
||||||
refreshIntv, _ := time.ParseDuration(cfg.Stratum.BlockRefreshInterval)
|
refreshIntv, _ := time.ParseDuration(cfg.BlockRefreshInterval)
|
||||||
refreshTimer := time.NewTimer(refreshIntv)
|
refreshTimer := time.NewTimer(refreshIntv)
|
||||||
log.Printf("Set block refresh every %v", refreshIntv)
|
log.Printf("Set block refresh every %v", refreshIntv)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user