mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge 6f882e6f86 into merged_master (Bitcoin PR bitcoin/bitcoin#28331)
This commit is contained in:
commit
70ba481063
22 changed files with 541 additions and 84 deletions
|
|
@ -3637,13 +3637,16 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
|||
return;
|
||||
}
|
||||
|
||||
if (!pfrom.IsInboundConn()) {
|
||||
// Log succesful connections unconditionally for outbound, but not for inbound as those
|
||||
// can be triggered by an attacker at high rate.
|
||||
if (!pfrom.IsInboundConn() || LogAcceptCategory(BCLog::NET, BCLog::Level::Debug)) {
|
||||
const auto mapped_as{m_connman.GetMappedAS(pfrom.addr)};
|
||||
LogPrintf("New outbound peer connected: version: %d, blocks=%d, peer=%d%s%s (%s)\n",
|
||||
LogPrintf("New %s %s peer connected: version: %d, blocks=%d, peer=%d%s%s\n",
|
||||
pfrom.ConnectionTypeAsString(),
|
||||
TransportTypeAsString(pfrom.m_transport->GetInfo().transport_type),
|
||||
pfrom.nVersion.load(), peer->m_starting_height,
|
||||
pfrom.GetId(), (fLogIPs ? strprintf(", peeraddr=%s", pfrom.addr.ToStringAddrPort()) : ""),
|
||||
(mapped_as ? strprintf(", mapped_as=%d", mapped_as) : ""),
|
||||
pfrom.ConnectionTypeAsString());
|
||||
(mapped_as ? strprintf(", mapped_as=%d", mapped_as) : ""));
|
||||
}
|
||||
|
||||
if (pfrom.GetCommonVersion() >= SHORT_IDS_BLOCKS_VERSION) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue