|
@@ -271,7 +271,7 @@ func testRecvTransactions(t *testing.T, protocol uint) {
|
|
|
head = handler.chain.CurrentBlock()
|
|
head = handler.chain.CurrentBlock()
|
|
|
td = handler.chain.GetTd(head.Hash(), head.NumberU64())
|
|
td = handler.chain.GetTd(head.Hash(), head.NumberU64())
|
|
|
)
|
|
)
|
|
|
- if err := src.Handshake(1, td, head.Hash(), genesis.Hash(), forkid.NewIDWithChain(handler.chain), forkid.NewFilter(handler.chain)); err != nil {
|
|
|
|
|
|
|
+ if err := src.Handshake(1, td, head.Hash(), genesis.Hash(), forkid.NewIDWithChain(handler.chain), forkid.NewFilter(handler.chain), nil); err != nil {
|
|
|
t.Fatalf("failed to run protocol handshake")
|
|
t.Fatalf("failed to run protocol handshake")
|
|
|
}
|
|
}
|
|
|
// Send the transaction to the sink and verify that it's added to the tx pool
|
|
// Send the transaction to the sink and verify that it's added to the tx pool
|
|
@@ -333,7 +333,7 @@ func testSendTransactions(t *testing.T, protocol uint) {
|
|
|
head = handler.chain.CurrentBlock()
|
|
head = handler.chain.CurrentBlock()
|
|
|
td = handler.chain.GetTd(head.Hash(), head.NumberU64())
|
|
td = handler.chain.GetTd(head.Hash(), head.NumberU64())
|
|
|
)
|
|
)
|
|
|
- if err := sink.Handshake(1, td, head.Hash(), genesis.Hash(), forkid.NewIDWithChain(handler.chain), forkid.NewFilter(handler.chain)); err != nil {
|
|
|
|
|
|
|
+ if err := sink.Handshake(1, td, head.Hash(), genesis.Hash(), forkid.NewIDWithChain(handler.chain), forkid.NewFilter(handler.chain), nil); err != nil {
|
|
|
t.Fatalf("failed to run protocol handshake")
|
|
t.Fatalf("failed to run protocol handshake")
|
|
|
}
|
|
}
|
|
|
// After the handshake completes, the source handler should stream the sink
|
|
// After the handshake completes, the source handler should stream the sink
|
|
@@ -532,7 +532,7 @@ func testCheckpointChallenge(t *testing.T, syncmode downloader.SyncMode, checkpo
|
|
|
head = handler.chain.CurrentBlock()
|
|
head = handler.chain.CurrentBlock()
|
|
|
td = handler.chain.GetTd(head.Hash(), head.NumberU64())
|
|
td = handler.chain.GetTd(head.Hash(), head.NumberU64())
|
|
|
)
|
|
)
|
|
|
- if err := remote.Handshake(1, td, head.Hash(), genesis.Hash(), forkid.NewIDWithChain(handler.chain), forkid.NewFilter(handler.chain)); err != nil {
|
|
|
|
|
|
|
+ if err := remote.Handshake(1, td, head.Hash(), genesis.Hash(), forkid.NewIDWithChain(handler.chain), forkid.NewFilter(handler.chain), nil); err != nil {
|
|
|
t.Fatalf("failed to run protocol handshake")
|
|
t.Fatalf("failed to run protocol handshake")
|
|
|
}
|
|
}
|
|
|
// Connect a new peer and check that we receive the checkpoint challenge
|
|
// Connect a new peer and check that we receive the checkpoint challenge
|
|
@@ -616,7 +616,7 @@ func testBroadcastBlock(t *testing.T, peers, bcasts int) {
|
|
|
go source.handler.runEthPeer(sourcePeer, func(peer *eth.Peer) error {
|
|
go source.handler.runEthPeer(sourcePeer, func(peer *eth.Peer) error {
|
|
|
return eth.Handle((*ethHandler)(source.handler), peer)
|
|
return eth.Handle((*ethHandler)(source.handler), peer)
|
|
|
})
|
|
})
|
|
|
- if err := sinkPeer.Handshake(1, td, genesis.Hash(), genesis.Hash(), forkid.NewIDWithChain(source.chain), forkid.NewFilter(source.chain)); err != nil {
|
|
|
|
|
|
|
+ if err := sinkPeer.Handshake(1, td, genesis.Hash(), genesis.Hash(), forkid.NewIDWithChain(source.chain), forkid.NewFilter(source.chain), nil); err != nil {
|
|
|
t.Fatalf("failed to run protocol handshake")
|
|
t.Fatalf("failed to run protocol handshake")
|
|
|
}
|
|
}
|
|
|
go eth.Handle(sink, sinkPeer)
|
|
go eth.Handle(sink, sinkPeer)
|
|
@@ -689,7 +689,7 @@ func testBroadcastMalformedBlock(t *testing.T, protocol uint) {
|
|
|
genesis = source.chain.Genesis()
|
|
genesis = source.chain.Genesis()
|
|
|
td = source.chain.GetTd(genesis.Hash(), genesis.NumberU64())
|
|
td = source.chain.GetTd(genesis.Hash(), genesis.NumberU64())
|
|
|
)
|
|
)
|
|
|
- if err := sink.Handshake(1, td, genesis.Hash(), genesis.Hash(), forkid.NewIDWithChain(source.chain), forkid.NewFilter(source.chain)); err != nil {
|
|
|
|
|
|
|
+ if err := sink.Handshake(1, td, genesis.Hash(), genesis.Hash(), forkid.NewIDWithChain(source.chain), forkid.NewFilter(source.chain), nil); err != nil {
|
|
|
t.Fatalf("failed to run protocol handshake")
|
|
t.Fatalf("failed to run protocol handshake")
|
|
|
}
|
|
}
|
|
|
// After the handshake completes, the source handler should stream the sink
|
|
// After the handshake completes, the source handler should stream the sink
|