diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2016-10-26 18:08:11 -0400 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-11-03 13:35:54 -0700 |
commit | 902768099cb92b39f5ff509cd91fdd8970759b8a (patch) | |
tree | 58c44ac95241fa4ad36b80a4eefdc1e87ecb4b3a /src/test/DoS_tests.cpp | |
parent | 7588b85cd2fc0a37c260d014206d5badde4b2c78 (diff) |
net: handle version push in InitializeNode
Diffstat (limited to 'src/test/DoS_tests.cpp')
-rw-r--r-- | src/test/DoS_tests.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp index 47979a6f86..6eed636080 100644 --- a/src/test/DoS_tests.cpp +++ b/src/test/DoS_tests.cpp @@ -50,7 +50,7 @@ BOOST_AUTO_TEST_CASE(DoS_banning) CAddress addr1(ip(0xa0b0c001), NODE_NONE); CNode dummyNode1(id++, NODE_NETWORK, 0, INVALID_SOCKET, addr1, 0, 0, "", true); dummyNode1.SetSendVersion(PROTOCOL_VERSION); - GetNodeSignals().InitializeNode(dummyNode1.GetId(), &dummyNode1); + GetNodeSignals().InitializeNode(&dummyNode1, *connman); dummyNode1.nVersion = 1; Misbehaving(dummyNode1.GetId(), 100); // Should get banned SendMessages(&dummyNode1, *connman); @@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE(DoS_banning) CAddress addr2(ip(0xa0b0c002), NODE_NONE); CNode dummyNode2(id++, NODE_NETWORK, 0, INVALID_SOCKET, addr2, 1, 1, "", true); dummyNode2.SetSendVersion(PROTOCOL_VERSION); - GetNodeSignals().InitializeNode(dummyNode2.GetId(), &dummyNode2); + GetNodeSignals().InitializeNode(&dummyNode2, *connman); dummyNode2.nVersion = 1; Misbehaving(dummyNode2.GetId(), 50); SendMessages(&dummyNode2, *connman); @@ -78,7 +78,7 @@ BOOST_AUTO_TEST_CASE(DoS_banscore) CAddress addr1(ip(0xa0b0c001), NODE_NONE); CNode dummyNode1(id++, NODE_NETWORK, 0, INVALID_SOCKET, addr1, 3, 1, "", true); dummyNode1.SetSendVersion(PROTOCOL_VERSION); - GetNodeSignals().InitializeNode(dummyNode1.GetId(), &dummyNode1); + GetNodeSignals().InitializeNode(&dummyNode1, *connman); dummyNode1.nVersion = 1; Misbehaving(dummyNode1.GetId(), 100); SendMessages(&dummyNode1, *connman); @@ -101,7 +101,7 @@ BOOST_AUTO_TEST_CASE(DoS_bantime) CAddress addr(ip(0xa0b0c001), NODE_NONE); CNode dummyNode(id++, NODE_NETWORK, 0, INVALID_SOCKET, addr, 4, 4, "", true); dummyNode.SetSendVersion(PROTOCOL_VERSION); - GetNodeSignals().InitializeNode(dummyNode.GetId(), &dummyNode); + GetNodeSignals().InitializeNode(&dummyNode, *connman); dummyNode.nVersion = 1; Misbehaving(dummyNode.GetId(), 100); |