mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
Merge #20131: test: Remove unused nVersion=1 in p2p tests
faad92fe1c
test: Remove unused nVersion=1 in p2p tests (MarcoFalke) Pull request description: After commitddefb5c0b7
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 ACKfaad92fe1c
fanquake: ACKfaad92fe1c
Tree-SHA512: 9a7029187aaa5a7929a4a2199646131ff1ea72df6a855ce7022dd3bb2647dd525356dbc5e460c77007eebcdeab400a689db8cb77e8239af3b539c117a4e0d16e
This commit is contained in:
commit
711ddce943
@ -88,7 +88,6 @@ BOOST_AUTO_TEST_CASE(outbound_slow_chain_eviction)
|
||||
dummyNode1.SetCommonVersion(PROTOCOL_VERSION);
|
||||
|
||||
peerLogic->InitializeNode(&dummyNode1);
|
||||
dummyNode1.nVersion = 1;
|
||||
dummyNode1.fSuccessfullyConnected = true;
|
||||
|
||||
// This test requires that we have a chain with non-zero work.
|
||||
@ -141,7 +140,6 @@ static void AddRandomOutboundPeer(std::vector<CNode *> &vNodes, PeerManager &pee
|
||||
node.SetCommonVersion(PROTOCOL_VERSION);
|
||||
|
||||
peerLogic.InitializeNode(&node);
|
||||
node.nVersion = 1;
|
||||
node.fSuccessfullyConnected = true;
|
||||
|
||||
connman->AddNode(node);
|
||||
@ -231,7 +229,6 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
|
||||
CNode dummyNode1(id++, NODE_NETWORK, 0, INVALID_SOCKET, addr1, 0, 0, CAddress(), "", ConnectionType::INBOUND);
|
||||
dummyNode1.SetCommonVersion(PROTOCOL_VERSION);
|
||||
peerLogic->InitializeNode(&dummyNode1);
|
||||
dummyNode1.nVersion = 1;
|
||||
dummyNode1.fSuccessfullyConnected = true;
|
||||
peerLogic->Misbehaving(dummyNode1.GetId(), DISCOURAGEMENT_THRESHOLD, /* message */ ""); // Should be discouraged
|
||||
{
|
||||
@ -245,7 +242,6 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
|
||||
CNode dummyNode2(id++, NODE_NETWORK, 0, INVALID_SOCKET, addr2, 1, 1, CAddress(), "", ConnectionType::INBOUND);
|
||||
dummyNode2.SetCommonVersion(PROTOCOL_VERSION);
|
||||
peerLogic->InitializeNode(&dummyNode2);
|
||||
dummyNode2.nVersion = 1;
|
||||
dummyNode2.fSuccessfullyConnected = true;
|
||||
peerLogic->Misbehaving(dummyNode2.GetId(), DISCOURAGEMENT_THRESHOLD - 1, /* message */ "");
|
||||
{
|
||||
@ -282,7 +278,6 @@ BOOST_AUTO_TEST_CASE(DoS_bantime)
|
||||
CNode dummyNode(id++, NODE_NETWORK, 0, INVALID_SOCKET, addr, 4, 4, CAddress(), "", ConnectionType::INBOUND);
|
||||
dummyNode.SetCommonVersion(PROTOCOL_VERSION);
|
||||
peerLogic->InitializeNode(&dummyNode);
|
||||
dummyNode.nVersion = 1;
|
||||
dummyNode.fSuccessfullyConnected = true;
|
||||
|
||||
peerLogic->Misbehaving(dummyNode.GetId(), DISCOURAGEMENT_THRESHOLD, /* message */ "");
|
||||
|
Loading…
Reference in New Issue
Block a user