From 95efa6a3f3d509cc5d38a7b629dca4a05c856186 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 15 Oct 2020 12:00:41 +0200 Subject: [PATCH] Merge #20131: test: Remove unused nVersion=1 in p2p tests faad92fe1c3cca9795226bd167130976930ddab8 test: Remove unused nVersion=1 in p2p tests (MarcoFalke) Pull request description: After commit ddefb5c0b759950942ac03f28c43b548af7b4033 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 faad92fe1c3cca9795226bd167130976930ddab8 fanquake: ACK faad92fe1c3cca9795226bd167130976930ddab8 Tree-SHA512: 9a7029187aaa5a7929a4a2199646131ff1ea72df6a855ce7022dd3bb2647dd525356dbc5e460c77007eebcdeab400a689db8cb77e8239af3b539c117a4e0d16e --- src/test/denialofservice_tests.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/test/denialofservice_tests.cpp b/src/test/denialofservice_tests.cpp index bfb62fbc2d7e17..041882c10b191f 100644 --- a/src/test/denialofservice_tests.cpp +++ b/src/test/denialofservice_tests.cpp @@ -85,7 +85,6 @@ BOOST_AUTO_TEST_CASE(outbound_slow_chain_eviction) dummyNode1.SetSendVersion(PROTOCOL_VERSION); peerLogic->InitializeNode(&dummyNode1); - dummyNode1.nVersion = 1; dummyNode1.fSuccessfullyConnected = true; // This test requires that we have a chain with non-zero work. @@ -139,7 +138,6 @@ static void AddRandomOutboundPeer(std::vector &vNodes, PeerLogicValidat node.SetSendVersion(PROTOCOL_VERSION); peerLogic.InitializeNode(&node); - node.nVersion = 1; node.fSuccessfullyConnected = true; connman->AddNode(node); @@ -228,7 +226,6 @@ BOOST_AUTO_TEST_CASE(DoS_banning) CNode dummyNode1(id++, NODE_NETWORK, 0, INVALID_SOCKET, addr1, 0, 0, CAddress(), "", true); dummyNode1.SetSendVersion(PROTOCOL_VERSION); peerLogic->InitializeNode(&dummyNode1); - dummyNode1.nVersion = 1; dummyNode1.fSuccessfullyConnected = true; { LOCK(cs_main); @@ -245,7 +242,6 @@ BOOST_AUTO_TEST_CASE(DoS_banning) CNode dummyNode2(id++, NODE_NETWORK, 0, INVALID_SOCKET, addr2, 1, 1, CAddress(), "", true); dummyNode2.SetSendVersion(PROTOCOL_VERSION); peerLogic->InitializeNode(&dummyNode2); - dummyNode2.nVersion = 1; dummyNode2.fSuccessfullyConnected = true; { LOCK(cs_main); @@ -333,7 +329,6 @@ BOOST_AUTO_TEST_CASE(DoS_bantime) CNode dummyNode(id++, NODE_NETWORK, 0, INVALID_SOCKET, addr, 4, 4, CAddress(), "", true); dummyNode.SetSendVersion(PROTOCOL_VERSION); peerLogic->InitializeNode(&dummyNode); - dummyNode.nVersion = 1; dummyNode.fSuccessfullyConnected = true; {