Skip to content

Commit bbc5130

Browse files
committed
arb sync_test: update for geth 1.12.2
1 parent 15e55cf commit bbc5130

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

arbitrum/sync_test.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ func TestSimpleSync(t *testing.T) {
142142
// source node
143143
sourceStackConf := node.DefaultConfig
144144
sourceStackConf.DataDir = t.TempDir()
145-
sourceStackConf.P2P.NoDiscovery = true
145+
sourceStackConf.P2P.DiscoveryV4 = false
146+
sourceStackConf.P2P.DiscoveryV5 = false
146147
sourceStackConf.P2P.ListenAddr = "127.0.0.1:0"
147148
sourceStackConf.P2P.PrivateKey = sourceKey
148149

@@ -276,7 +277,9 @@ func TestSimpleSync(t *testing.T) {
276277
// source node
277278
sourceHandler := NewProtocolHandler(sourceDb, sourceChain, &dummySyncHelper{syncBlock.Header(), pivotBlock.Header()}, false)
278279
sourceStack.RegisterProtocols(sourceHandler.MakeProtocols(&dummyIterator{}))
279-
sourceStack.Start()
280+
if err := sourceStack.Start(); err != nil {
281+
t.Fatal(err)
282+
}
280283

281284
// bad node (on wrong blockchain)
282285
_, badBlocks, _ := core.GenerateChainWithGenesis(gspec, ethash.NewFaker(), syncBlockNum+extraBlocks, func(i int, gen *core.BlockGen) {
@@ -309,7 +312,9 @@ func TestSimpleSync(t *testing.T) {
309312
}
310313
badHandler := NewProtocolHandler(badDb, badChain, &dummySyncHelper{blocks[syncBlockNum-1].Header(), badBlocks[pivotBlockNum-1].Header()}, false)
311314
badStack.RegisterProtocols(badHandler.MakeProtocols(&dummyIterator{}))
312-
badStack.Start()
315+
if err := badStack.Start(); err != nil {
316+
t.Fatal(err)
317+
}
313318

314319
// figure out port of the source node and create dummy iter that points to it
315320
sourcePort, err := portFromAddress(sourceStack.Server().Config.ListenAddr)
@@ -348,7 +353,9 @@ func TestSimpleSync(t *testing.T) {
348353
log.Info("initial source", "head", sourceChain.CurrentBlock())
349354
log.Info("initial dest", "head", destChain.CurrentBlock())
350355
log.Info("pivot", "head", pivotBlock.Header())
351-
destStack.Start()
356+
if err := destStack.Start(); err != nil {
357+
t.Fatal(err)
358+
}
352359

353360
<-time.After(time.Second * 5)
354361

0 commit comments

Comments
 (0)