Skip to content

Commit e444215

Browse files
committed
Fix test setup
1 parent e4e94f2 commit e444215

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

node/helpers_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ func createNodesWithCleanup(t *testing.T, num int, config evconfig.Config) ([]*F
194194
aggListenAddress := config.P2P.ListenAddress
195195
aggPeers := config.P2P.Peers
196196
executor, sequencer, daClient, aggP2PKey, ds, stopDAHeightTicker := createTestComponents(t, config)
197+
if d, ok := daClient.(*testda.DummyDA); ok {
198+
d.Reset()
199+
}
197200
aggPeerID, err := peer.IDFromPrivateKey(aggP2PKey.PrivKey)
198201
require.NoError(err)
199202

@@ -235,6 +238,8 @@ func createNodesWithCleanup(t *testing.T, num int, config evconfig.Config) ([]*F
235238
config.P2P.ListenAddress = fmt.Sprintf("/ip4/127.0.0.1/tcp/%d", 40001+i)
236239
config.RPC.Address = fmt.Sprintf("127.0.0.1:%d", 8001+i)
237240
executor, sequencer, daClient, nodeP2PKey, ds, stopDAHeightTicker := createTestComponents(t, config)
241+
stopDAHeightTicker()
242+
238243
node, err := NewNode(
239244
config,
240245
executor,
@@ -249,9 +254,8 @@ func createNodesWithCleanup(t *testing.T, num int, config evconfig.Config) ([]*F
249254
NodeOptions{},
250255
)
251256
require.NoError(err)
252-
// Update cleanup to cancel the context instead of calling Stop
253257
cleanup := func() {
254-
stopDAHeightTicker()
258+
// No-op: ticker already stopped
255259
}
256260
nodes[i], cleanups[i] = node.(*FullNode), cleanup
257261
nodePeerID, err := peer.IDFromPrivateKey(nodeP2PKey.PrivKey)

0 commit comments

Comments
 (0)