mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
[log] Add connection type to log statement
In addition to adding more specificity to the log statement about the type of connection, this change also consolidates two statements into one. Previously, the second one should have never been hit, since block-relay connections would match the "!IsInboundConn()" condition and return early.
This commit is contained in:
@@ -3521,11 +3521,7 @@ void PeerManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, CDat
|
||||
// Making nodes which are behind NAT and can only make outgoing connections ignore
|
||||
// the getaddr message mitigates the attack.
|
||||
if (!pfrom.IsInboundConn()) {
|
||||
LogPrint(BCLog::NET, "Ignoring \"getaddr\" from outbound connection. peer=%d\n", pfrom.GetId());
|
||||
return;
|
||||
}
|
||||
if (!pfrom.RelayAddrsWithConn()) {
|
||||
LogPrint(BCLog::NET, "Ignoring \"getaddr\" from block-relay-only connection. peer=%d\n", pfrom.GetId());
|
||||
LogPrint(BCLog::NET, "Ignoring \"getaddr\" from %s connection. peer=%d\n", pfrom.ConnectionTypeAsString(), pfrom.GetId());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user