consensus, ethdb, metrics: implement forced-meter (#17667)

This commit is contained in:
gary rong
2018-09-17 20:32:34 +08:00
committed by Péter Szilágyi
parent 41ac8dd803
commit 5d1d1a808d
4 changed files with 49 additions and 16 deletions

View File

@ -485,7 +485,7 @@ func New(config Config, notify []string, noverify bool) *Ethash {
caches: newlru("cache", config.CachesInMem, newCache),
datasets: newlru("dataset", config.DatasetsInMem, newDataset),
update: make(chan struct{}),
hashrate: metrics.NewMeter(),
hashrate: metrics.NewMeterForced(),
workCh: make(chan *sealTask),
fetchWorkCh: make(chan *sealWork),
submitWorkCh: make(chan *mineResult),
@ -505,7 +505,7 @@ func NewTester(notify []string, noverify bool) *Ethash {
caches: newlru("cache", 1, newCache),
datasets: newlru("dataset", 1, newDataset),
update: make(chan struct{}),
hashrate: metrics.NewMeter(),
hashrate: metrics.NewMeterForced(),
workCh: make(chan *sealTask),
fetchWorkCh: make(chan *sealWork),
submitWorkCh: make(chan *mineResult),