mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-09 06:09:48 +02:00
Merge bitcoin/bitcoin#24543: net processing: Move remaining globals into PeerManagerImpl
778343a379scripted-diff: Rename PeerManagerImpl members (dergoegge)91c339243e[net processing] Move nHighestFastAnnounce into PeerManagerImpl (dergoegge)10b83e2aa3[net processing] Move block cache state into PeerManagerImpl (dergoegge)a4c55a93ef[net processing] Inline and simplify UpdatePreferredDownload (dergoegge)490c08f96a[net processing] Move nPreferredDownload into PeerManagerImpl (dergoegge)a292df283a[net processing] Move mapNodeState into PeerManagerImpl (dergoegge)37ecaf3e7a[net processing] Move CNodeState declaration above PeerManagerImpl (dergoegge) Pull request description: This PR moves the remaining net processing globals into `PeerManagerImpl`. This will make testing the peer manager in isolation easier and also acts as a code clean up. ACKs for top commit: jnewbery: Code review ACK778343a379MarcoFalke: ACK778343a379🗒 Tree-SHA512: 4f22105d1de37b94c3ef349f38784a30cf8d450d394a6a7849e5bd78940a71e3edbffa3d25e8efb35d7f698fd255f199de7bd4c33e23af5621a6e4e67ed43cb5
This commit is contained in:
@@ -32,8 +32,6 @@ static CService ip(uint32_t i)
|
||||
return CService(CNetAddr(s), Params().GetDefaultPort());
|
||||
}
|
||||
|
||||
void UpdateLastBlockAnnounceTime(NodeId node, int64_t time_in_seconds);
|
||||
|
||||
BOOST_FIXTURE_TEST_SUITE(denialofservice_tests, TestingSetup)
|
||||
|
||||
// Test eviction of an outbound peer whose chain never advances
|
||||
@@ -195,7 +193,7 @@ BOOST_AUTO_TEST_CASE(stale_tip_peer_management)
|
||||
|
||||
// Update the last announced block time for the last
|
||||
// peer, and check that the next newest node gets evicted.
|
||||
UpdateLastBlockAnnounceTime(vNodes.back()->GetId(), GetTime());
|
||||
peerLogic->UpdateLastBlockAnnounceTime(vNodes.back()->GetId(), GetTime());
|
||||
|
||||
peerLogic->CheckForStaleTipAndEvictPeers();
|
||||
for (int i = 0; i < max_outbound_full_relay - 1; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user