aboutsummaryrefslogtreecommitdiffstats
path: root/eth/handler_test.go
diff options
context:
space:
mode:
authorRyan Schneider <ryanleeschneider@gmail.com>2018-11-03 04:26:45 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-12-10 20:30:06 +0800
commit48b70ecff1152f9eec091ff03b803d997a573b19 (patch)
tree9841b5efdbbd571c662d3d84afa679cdf6ade5aa /eth/handler_test.go
parentc1e3fe6b140c6ac7f9d7c792480a10208a4ac7ec (diff)
downloaddexon-48b70ecff1152f9eec091ff03b803d997a573b19.tar.gz
dexon-48b70ecff1152f9eec091ff03b803d997a573b19.tar.zst
dexon-48b70ecff1152f9eec091ff03b803d997a573b19.zip
cmd, eth: Add support for `--whitelist <blocknum>=<hash>,...` flag
* Rejects peers that respond with a different hash for any of the passed in block numbers. * Meant for emergency situations when the network forks unexpectedly.
Diffstat (limited to 'eth/handler_test.go')
-rw-r--r--eth/handler_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/handler_test.go b/eth/handler_test.go
index 44824fd0b..9fffd9581 100644
--- a/eth/handler_test.go
+++ b/eth/handler_test.go
@@ -478,7 +478,7 @@ func testDAOChallenge(t *testing.T, localForked, remoteForked bool, timeout bool
if err != nil {
t.Fatalf("failed to create new blockchain: %v", err)
}
- pm, err := NewProtocolManager(config, downloader.FullSync, DefaultConfig.NetworkId, evmux, new(testTxPool), pow, blockchain, db)
+ pm, err := NewProtocolManager(config, downloader.FullSync, DefaultConfig.NetworkId, evmux, new(testTxPool), pow, blockchain, db, nil)
if err != nil {
t.Fatalf("failed to start test protocol manager: %v", err)
}
@@ -559,7 +559,7 @@ func testBroadcastBlock(t *testing.T, totalPeers, broadcastExpected int) {
if err != nil {
t.Fatalf("failed to create new blockchain: %v", err)
}
- pm, err := NewProtocolManager(config, downloader.FullSync, DefaultConfig.NetworkId, evmux, new(testTxPool), pow, blockchain, db)
+ pm, err := NewProtocolManager(config, downloader.FullSync, DefaultConfig.NetworkId, evmux, new(testTxPool), pow, blockchain, db, nil)
if err != nil {
t.Fatalf("failed to start test protocol manager: %v", err)
}