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

@ -17,9 +17,6 @@ type EWMA interface {
// NewEWMA constructs a new EWMA with the given alpha.
func NewEWMA(alpha float64) EWMA {
if !Enabled {
return NilEWMA{}
}
return &StandardEWMA{alpha: alpha}
}