Skip to content

Commit

Permalink
refactor: use configsnot params
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Oct 29, 2024
1 parent 928ab5e commit 1b507c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/meterer/meterer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion core/meterer/meterer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func setup(_ *testing.M) {
// metrics.NewNoopMetrics(),
)

mt.Start(context.Background(), config.UpdateInterval)
mt.Start(context.Background())
}

func teardown() {
Expand Down

0 comments on commit 1b507c1

Please sign in to comment.