diff options
author | fanquake <fanquake@gmail.com> | 2020-05-12 21:08:32 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2020-05-12 21:47:06 +0800 |
commit | 8da1e43b63cb36759eeb1fcfd6768163265c44e2 (patch) | |
tree | 863bbb6932080ba95a8174622533d1e3eb7511b9 /src/test/denialofservice_tests.cpp | |
parent | e45fb7e0d276ce13447a08e5270930bef3c56dd1 (diff) | |
parent | e3047edfb63c3d098cb56ba9f9a1e7e0a795d552 (diff) |
Merge #18910: p2p: add MAX_FEELER_CONNECTIONS constant
e3047edfb63c3d098cb56ba9f9a1e7e0a795d552 test: use p2p constants in denial of service tests (fanquake)
25d8264c95eaf98a66df32addb0bf32d795a35bd p2p: add MAX_FEELER_CONNECTIONS constant (tryphe)
Pull request description:
Extracted from #16003.
ACKs for top commit:
naumenkogs:
utACK e3047ed
Tree-SHA512: 14fc15292be4db2e825a0331dd189a48713464f622a91c589122c1a7135bcfd37a61e64af1e76d32880ded09c24efd54d3c823467d6c35367a380e0be33bd35f
Diffstat (limited to 'src/test/denialofservice_tests.cpp')
-rw-r--r-- | src/test/denialofservice_tests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/denialofservice_tests.cpp b/src/test/denialofservice_tests.cpp index 6314c1a42f..75b38670c9 100644 --- a/src/test/denialofservice_tests.cpp +++ b/src/test/denialofservice_tests.cpp @@ -151,11 +151,11 @@ BOOST_AUTO_TEST_CASE(stale_tip_peer_management) auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), nullptr, *m_node.scheduler, *m_node.mempool); const Consensus::Params& consensusParams = Params().GetConsensus(); - constexpr int max_outbound_full_relay = 8; + constexpr int max_outbound_full_relay = MAX_OUTBOUND_FULL_RELAY_CONNECTIONS; CConnman::Options options; - options.nMaxConnections = 125; + options.nMaxConnections = DEFAULT_MAX_PEER_CONNECTIONS; options.m_max_outbound_full_relay = max_outbound_full_relay; - options.nMaxFeeler = 1; + options.nMaxFeeler = MAX_FEELER_CONNECTIONS; connman->Init(options); std::vector<CNode *> vNodes; |