mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Merge #20677: doc: Remove shouty enums in net_processing comments
0c41c1083089efb158de828f97eb00e206f2869a doc: Remove shouty enums in net_processing comments (Suhas Daftuar) Pull request description: This uses the `CNode::ConnectionTypeAsString()` strings in place of the all-caps enums in a couple of comments in `net_processing`, as suggested by ajtowns in https://github.com/bitcoin/bitcoin/pull/19858#discussion_r540821050. ACKs for top commit: practicalswift: ACK 0c41c1083089efb158de828f97eb00e206f2869a jnewbery: ACK 0c41c1083089efb158de828f97eb00e206f2869a laanwj: ACK 0c41c1083089efb158de828f97eb00e206f2869a Tree-SHA512: c8ab905e151ebb144c3f878277dc59d77591e4b39632658407b69b80b80d65825d5a391b01e2aea6af2fdf174c143dfe7d2f3eba84a020a58d7926458fdcd0a5
This commit is contained in:
parent
27efa9918f
commit
fdfe72bb75
@ -3020,8 +3020,8 @@ void PeerManagerImpl::ProcessMessage(
|
||||
// empty and no one will know who we are, so these mechanisms are
|
||||
// important to help us connect to the network.
|
||||
//
|
||||
// We skip this for BLOCK_RELAY peers to avoid potentially leaking
|
||||
// information about our BLOCK_RELAY connections via address relay.
|
||||
// We skip this for block-relay-only peers to avoid potentially leaking
|
||||
// information about our block-relay-only connections via address relay.
|
||||
if (fListen && !m_chainman.ActiveChainstate().IsInitialBlockDownload())
|
||||
{
|
||||
CAddress addr = GetLocalAddress(&pfrom.addr, pfrom.GetLocalServices());
|
||||
@ -4651,10 +4651,10 @@ void PeerManagerImpl::EvictExtraOutboundPeers(int64_t time_in_seconds)
|
||||
});
|
||||
}
|
||||
|
||||
// Check whether we have too many OUTBOUND_FULL_RELAY peers
|
||||
// Check whether we have too many outbound-full-relay peers
|
||||
if (m_connman.GetExtraFullOutboundCount() > 0) {
|
||||
// If we have more OUTBOUND_FULL_RELAY peers than we target, disconnect one.
|
||||
// Pick the OUTBOUND_FULL_RELAY peer that least recently announced
|
||||
// If we have more outbound-full-relay peers than we target, disconnect one.
|
||||
// Pick the outbound-full-relay peer that least recently announced
|
||||
// us a new block, with ties broken by choosing the more recent
|
||||
// connection (higher node id)
|
||||
NodeId worst_peer = -1;
|
||||
@ -4665,7 +4665,7 @@ void PeerManagerImpl::EvictExtraOutboundPeers(int64_t time_in_seconds)
|
||||
|
||||
// Don't disconnect masternodes just because they were slow in block announcement
|
||||
if (pnode->m_masternode_connection) return;
|
||||
// Only consider OUTBOUND_FULL_RELAY peers that are not already
|
||||
// Only consider outbound-full-relay peers that are not already
|
||||
// marked for disconnection
|
||||
if (!pnode->IsFullOutboundConn() || pnode->fDisconnect) return;
|
||||
CNodeState *state = State(pnode->GetId());
|
||||
|
Loading…
Reference in New Issue
Block a user