diff --git a/core/meterer/meterer.go b/core/meterer/meterer.go index 4f24ec6e12..53ac0848af 100644 --- a/core/meterer/meterer.go +++ b/core/meterer/meterer.go @@ -50,9 +50,9 @@ func NewMeterer( } // Start starts to periodically refreshing the on-chain state -func (m *Meterer) Start(ctx context.Context, updateInterval time.Duration) { +func (m *Meterer) Start(ctx context.Context) { go func() { - ticker := time.NewTicker(updateInterval) + ticker := time.NewTicker(m.UpdateInterval) defer ticker.Stop() for { diff --git a/core/meterer/meterer_test.go b/core/meterer/meterer_test.go index ef6e9f8cf3..8fb2d1b9df 100644 --- a/core/meterer/meterer_test.go +++ b/core/meterer/meterer_test.go @@ -158,7 +158,7 @@ func setup(_ *testing.M) { // metrics.NewNoopMetrics(), ) - mt.Start(context.Background(), config.UpdateInterval) + mt.Start(context.Background()) } func teardown() {