diff --git a/disperser/apiserver/server_test.go b/disperser/apiserver/server_test.go index 5e63d1c78..9d8225e74 100644 --- a/disperser/apiserver/server_test.go +++ b/disperser/apiserver/server_test.go @@ -798,7 +798,11 @@ func newTestServer(transactor core.Writer, testName string) *apiserver.Dispersal teardown() panic("failed to create offchain store") } - mt := meterer.NewMeterer(meterer.Config{}, mockState, store, logger) + mt := meterer.NewMeterer(meterer.Config{ + ChainReadTimeout: 1 * time.Second, + OnchainUpdateInterval: 1 * time.Second, + OffchainPruneInterval: 1 * time.Second, + }, mockState, store, logger) err = mt.ChainPaymentState.RefreshOnchainPaymentState(context.Background()) if err != nil { panic("failed to make initial query to the on-chain state") diff --git a/disperser/apiserver/server_v2_test.go b/disperser/apiserver/server_v2_test.go index 37b8237e8..2518e831f 100644 --- a/disperser/apiserver/server_v2_test.go +++ b/disperser/apiserver/server_v2_test.go @@ -482,7 +482,11 @@ func newTestServerV2(t *testing.T) *testComponents { teardown() panic("failed to create offchain store") } - meterer := meterer.NewMeterer(meterer.Config{}, mockState, store, logger) + meterer := meterer.NewMeterer(meterer.Config{ + ChainReadTimeout: 1 * time.Second, + OnchainUpdateInterval: 1 * time.Second, + OffchainPruneInterval: 1 * time.Second, + }, mockState, store, logger) chainReader.On("GetCurrentBlockNumber").Return(uint32(100), nil) chainReader.On("GetQuorumCount").Return(uint8(2), nil) diff --git a/test/integration_test.go b/test/integration_test.go index 9bc831cfe..e5276bf49 100644 --- a/test/integration_test.go +++ b/test/integration_test.go @@ -293,7 +293,11 @@ func mustMakeDisperser(t *testing.T, cst core.IndexedChainState, store disperser panic("failed to make initial query to the on-chain state") } - mt := meterer.NewMeterer(meterer.Config{}, mockState, offchainStore, logger) + mt := meterer.NewMeterer(meterer.Config{ + ChainReadTimeout: 1 * time.Second, + OnchainUpdateInterval: 1 * time.Second, + OffchainPruneInterval: 1 * time.Second, + }, mockState, offchainStore, logger) server := apiserver.NewDispersalServer(serverConfig, store, tx, logger, disperserMetrics, grpcprom.NewServerMetrics(), mt, ratelimiter, rateConfig, testMaxBlobSize) return TestDisperser{