From e317f978ef314a577e71ec5f07a372e720db9f4e Mon Sep 17 00:00:00 2001 From: ucwong Date: Sun, 3 Mar 2024 20:40:15 +0800 Subject: [PATCH] eth : Add node id to handlerConfig in test --- eth/handler_eth_test.go | 2 ++ eth/handler_test.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/eth/handler_eth_test.go b/eth/handler_eth_test.go index 579ca3c097..5e9c8b3a8a 100644 --- a/eth/handler_eth_test.go +++ b/eth/handler_eth_test.go @@ -106,6 +106,7 @@ func testForkIDSplit(t *testing.T, protocol uint) { _, blocksProFork, _ = core.GenerateChainWithGenesis(gspecProFork, engine, 2, nil) ethNoFork, _ = newHandler(&handlerConfig{ + NodeID: enode.ID{0, 0, 0, 0, 0, 0, 0, 128, 106, 217, 182, 31, 165, 174, 1, 67, 7, 235, 220, 150, 66, 83, 173, 205, 159, 44, 10, 57, 42, 161, 26, 188}, Database: dbNoFork, Chain: chainNoFork, TxPool: newTestTxPool(), @@ -115,6 +116,7 @@ func testForkIDSplit(t *testing.T, protocol uint) { BloomCache: 1, }) ethProFork, _ = newHandler(&handlerConfig{ + NodeID: enode.ID{0, 0, 0, 0, 0, 0, 0, 128, 106, 217, 182, 31, 165, 174, 1, 67, 7, 235, 220, 150, 66, 83, 173, 205, 159, 44, 10, 57, 42, 161, 26, 188}, Database: dbProFork, Chain: chainProFork, TxPool: newTestTxPool(), diff --git a/eth/handler_test.go b/eth/handler_test.go index 58353f6b64..2f40457967 100644 --- a/eth/handler_test.go +++ b/eth/handler_test.go @@ -33,6 +33,7 @@ import ( "github.com/ethereum/go-ethereum/eth/downloader" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" + "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/params" "github.com/holiman/uint256" ) @@ -161,6 +162,7 @@ func newTestHandlerWithBlocks(blocks int) *testHandler { txpool := newTestTxPool() handler, _ := newHandler(&handlerConfig{ + NodeID: enode.ID{0, 0, 0, 0, 0, 0, 0, 128, 106, 217, 182, 31, 165, 174, 1, 67, 7, 235, 220, 150, 66, 83, 173, 205, 159, 44, 10, 57, 42, 161, 26, 188}, Database: db, Chain: chain, TxPool: txpool,