Skip to content

Commit 13f2014

Browse files
laanwjPastaPastaPasta
authored andcommitted
Merge bitcoin#20131: test: Remove unused nVersion=1 in p2p tests
faad92f test: Remove unused nVersion=1 in p2p tests (MarcoFalke) Pull request description: After commit ddefb5c nVersion is no longer used in p2p logic when sending messages. Only when receiving messages, but in this test no messages are received. ACKs for top commit: laanwj: Code review ACK faad92f fanquake: ACK faad92f Tree-SHA512: 9a7029187aaa5a7929a4a2199646131ff1ea72df6a855ce7022dd3bb2647dd525356dbc5e460c77007eebcdeab400a689db8cb77e8239af3b539c117a4e0d16e
1 parent 05a4222 commit 13f2014

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/test/denialofservice_tests.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ BOOST_AUTO_TEST_CASE(outbound_slow_chain_eviction)
8585
dummyNode1.SetSendVersion(PROTOCOL_VERSION);
8686

8787
peerLogic->InitializeNode(&dummyNode1);
88-
dummyNode1.nVersion = 1;
8988
dummyNode1.fSuccessfullyConnected = true;
9089

9190
// This test requires that we have a chain with non-zero work.
@@ -139,7 +138,6 @@ static void AddRandomOutboundPeer(std::vector<CNode *> &vNodes, PeerLogicValidat
139138
node.SetSendVersion(PROTOCOL_VERSION);
140139

141140
peerLogic.InitializeNode(&node);
142-
node.nVersion = 1;
143141
node.fSuccessfullyConnected = true;
144142

145143
connman->AddNode(node);
@@ -228,7 +226,6 @@ BOOST_AUTO_TEST_CASE(DoS_banning)
228226
CNode dummyNode1(id++, NODE_NETWORK, 0, INVALID_SOCKET, addr1, 0, 0, CAddress(), "", true);
229227
dummyNode1.SetSendVersion(PROTOCOL_VERSION);
230228
peerLogic->InitializeNode(&dummyNode1);
231-
dummyNode1.nVersion = 1;
232229
dummyNode1.fSuccessfullyConnected = true;
233230
{
234231
LOCK(cs_main);
@@ -245,7 +242,6 @@ BOOST_AUTO_TEST_CASE(DoS_banning)
245242
CNode dummyNode2(id++, NODE_NETWORK, 0, INVALID_SOCKET, addr2, 1, 1, CAddress(), "", true);
246243
dummyNode2.SetSendVersion(PROTOCOL_VERSION);
247244
peerLogic->InitializeNode(&dummyNode2);
248-
dummyNode2.nVersion = 1;
249245
dummyNode2.fSuccessfullyConnected = true;
250246
{
251247
LOCK(cs_main);
@@ -333,7 +329,6 @@ BOOST_AUTO_TEST_CASE(DoS_bantime)
333329
CNode dummyNode(id++, NODE_NETWORK, 0, INVALID_SOCKET, addr, 4, 4, CAddress(), "", true);
334330
dummyNode.SetSendVersion(PROTOCOL_VERSION);
335331
peerLogic->InitializeNode(&dummyNode);
336-
dummyNode.nVersion = 1;
337332
dummyNode.fSuccessfullyConnected = true;
338333

339334
{

0 commit comments

Comments
 (0)