Skip to content

Commit 35839e9

Browse files
committed
[net] Fix bug where AddrFetch connections would be counted as outbound full relay
The desired logic is for us to only open feeler connections after we have hit the max count for outbound full relay connections. A short lived AddrFetch connection (previously called oneshot) could cause ThreadOpenConnections to miscount and mistakenly open a feeler instead of full relay.
1 parent 4972c21 commit 35839e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1841,7 +1841,7 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
18411841
setConnected.insert(pnode->addr.GetGroup(addrman.m_asmap));
18421842
if (pnode->m_tx_relay == nullptr) {
18431843
nOutboundBlockRelay++;
1844-
} else if (!pnode->IsFeelerConn()) {
1844+
} else if (pnode->m_conn_type == ConnectionType::OUTBOUND) {
18451845
nOutboundFullRelay++;
18461846
}
18471847
}

0 commit comments

Comments
 (0)