aboutsummaryrefslogtreecommitdiff
path: root/src/test/denialofservice_tests.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2020-10-23 10:28:33 +0100
committerJohn Newbery <john@johnnewbery.com>2021-03-22 10:25:39 +0000
commit3fc06d3d7b43dc1143fe0850db23c4e7ffbfe682 (patch)
tree8fb6ee74b7dafe3c7a333c8804bfa4f9d7a03937 /src/test/denialofservice_tests.cpp
parent7c4cc67c0c3c50df004ee53cac5b2884b7fbab29 (diff)
[net] remove fUpdateConnectionTime from FinalizeNode
PeerManager can just call directly into CAddrMan::Connected() now.
Diffstat (limited to 'src/test/denialofservice_tests.cpp')
-rw-r--r--src/test/denialofservice_tests.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/test/denialofservice_tests.cpp b/src/test/denialofservice_tests.cpp
index a4ad7ed7cf..7557d4618a 100644
--- a/src/test/denialofservice_tests.cpp
+++ b/src/test/denialofservice_tests.cpp
@@ -117,8 +117,7 @@ BOOST_AUTO_TEST_CASE(outbound_slow_chain_eviction)
BOOST_CHECK(dummyNode1.fDisconnect == true);
SetMockTime(0);
- bool dummy;
- peerLogic->FinalizeNode(dummyNode1, dummy);
+ peerLogic->FinalizeNode(dummyNode1);
}
static void AddRandomOutboundPeer(std::vector<CNode *> &vNodes, PeerManager &peerLogic, CConnmanTest* connman)
@@ -199,9 +198,8 @@ BOOST_AUTO_TEST_CASE(stale_tip_peer_management)
BOOST_CHECK(vNodes[max_outbound_full_relay-1]->fDisconnect == true);
BOOST_CHECK(vNodes.back()->fDisconnect == false);
- bool dummy;
for (const CNode *node : vNodes) {
- peerLogic->FinalizeNode(*node, dummy);
+ peerLogic->FinalizeNode(*node);
}
connman->ClearNodes();
@@ -249,9 +247,8 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
BOOST_CHECK(banman->IsDiscouraged(addr1)); // Expect both 1 and 2
BOOST_CHECK(banman->IsDiscouraged(addr2)); // to be discouraged now
- bool dummy;
- peerLogic->FinalizeNode(dummyNode1, dummy);
- peerLogic->FinalizeNode(dummyNode2, dummy);
+ peerLogic->FinalizeNode(dummyNode1);
+ peerLogic->FinalizeNode(dummyNode2);
}
BOOST_AUTO_TEST_CASE(DoS_bantime)
@@ -279,8 +276,7 @@ BOOST_AUTO_TEST_CASE(DoS_bantime)
}
BOOST_CHECK(banman->IsDiscouraged(addr));
- bool dummy;
- peerLogic->FinalizeNode(dummyNode, dummy);
+ peerLogic->FinalizeNode(dummyNode);
}
class TxOrphanageTest : public TxOrphanage