Skip to content

Commit 1e563ae

Browse files
committed
[refactor] Simplify check for block-relay-only connection.
Previously we deduced it was a block-relay-only based on presence of the m_tx_relay structure. Now we have the ability to identify it directly via a connection type accessor function.
1 parent da3a0be commit 1e563ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net_processing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2018,7 +2018,7 @@ static void ProcessHeadersMessage(CNode& pfrom, CConnman& connman, ChainstateMan
20182018
}
20192019
}
20202020

2021-
if (!pfrom.fDisconnect && pfrom.IsOutboundOrBlockRelayConn() && nodestate->pindexBestKnownBlock != nullptr && pfrom.m_tx_relay != nullptr) {
2021+
if (!pfrom.fDisconnect && pfrom.IsFullOutboundConn() && nodestate->pindexBestKnownBlock != nullptr) {
20222022
// If this is an outbound full-relay peer, check to see if we should protect
20232023
// it from the bad/lagging chain logic.
20242024
// Note that block-relay-only peers are already implicitly protected, so we

0 commit comments

Comments
 (0)