diff --git a/blockbook.go b/blockbook.go index 4743f457..9841c042 100644 --- a/blockbook.go +++ b/blockbook.go @@ -422,7 +422,7 @@ func storeInternalStateLoop() { }() var computeRunning bool lastCompute := time.Now() - // randomize the duration between ComputeInternalStateColumnStats to avoid peeks after reboot of machine with multiple blockbooks + // randomize the duration between ComputeInternalStateColumnStats to avoid peaks after reboot of machine with multiple blockbooks computePeriod := 9*time.Hour + time.Duration(rand.Float64()*float64((2*time.Hour).Nanoseconds())) glog.Info("storeInternalStateLoop starting with internal state compute period ", computePeriod) tickAndDebounce(storeInternalStatePeriodMs*time.Millisecond, (storeInternalStatePeriodMs-1)*time.Millisecond, chanStoreInternalState, func() {