|
|
|
@ -86,9 +86,6 @@ func NewStratum(cfg *pool.Config) *StratumServer {
@@ -86,9 +86,6 @@ func NewStratum(cfg *pool.Config) *StratumServer {
|
|
|
|
|
luckLargeWindow, _ := time.ParseDuration(cfg.LargeLuckWindow) |
|
|
|
|
stratum.luckLargeWindow = int64(luckLargeWindow / time.Millisecond) |
|
|
|
|
|
|
|
|
|
// Init block template
|
|
|
|
|
stratum.refreshBlockTemplate(false) |
|
|
|
|
|
|
|
|
|
refreshIntv, _ := time.ParseDuration(cfg.BlockRefreshInterval) |
|
|
|
|
refreshTimer := time.NewTimer(refreshIntv) |
|
|
|
|
log.Printf("Set block refresh every %v", refreshIntv) |
|
|
|
@ -96,6 +93,9 @@ func NewStratum(cfg *pool.Config) *StratumServer {
@@ -96,6 +93,9 @@ func NewStratum(cfg *pool.Config) *StratumServer {
|
|
|
|
|
checkIntv, _ := time.ParseDuration(cfg.UpstreamCheckInterval) |
|
|
|
|
checkTimer := time.NewTimer(checkIntv) |
|
|
|
|
|
|
|
|
|
// Init block template
|
|
|
|
|
stratum.refreshBlockTemplate(false) |
|
|
|
|
|
|
|
|
|
go func() { |
|
|
|
|
for { |
|
|
|
|
select { |
|
|
|
|