@@ -3568,15 +3568,11 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
35683568 m_addrman.Good (pfrom.addr );
35693569 }
35703570
3571- std::string remoteAddr;
3572- if (fLogIPs )
3573- remoteAddr = " , peeraddr=" + pfrom.addr .ToStringAddrPort ();
3574-
35753571 const auto mapped_as{m_connman.GetMappedAS (pfrom.addr )};
35763572 LogDebug (BCLog::NET, " receive version message: %s: version %d, blocks=%d, us=%s, txrelay=%d, peer=%d%s%s\n " ,
35773573 cleanSubVer, pfrom.nVersion ,
35783574 peer->m_starting_height , addrMe.ToStringAddrPort (), fRelay , pfrom.GetId (),
3579- remoteAddr , (mapped_as ? strprintf (" , mapped_as=%d" , mapped_as) : " " ));
3575+ pfrom. LogIP ( fLogIPs ) , (mapped_as ? strprintf (" , mapped_as=%d" , mapped_as) : " " ));
35803576
35813577 peer->m_time_offset = NodeSeconds{std::chrono::seconds{nTime}} - Now<NodeSeconds>();
35823578 if (!pfrom.IsInboundConn ()) {
@@ -3620,7 +3616,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
36203616 pfrom.ConnectionTypeAsString (),
36213617 TransportTypeAsString (pfrom.m_transport ->GetInfo ().transport_type ),
36223618 pfrom.nVersion .load (), peer->m_starting_height ,
3623- pfrom.GetId (), ( fLogIPs ? strprintf ( " , peeraddr=%s " , pfrom.addr . ToStringAddrPort ()) : " " ),
3619+ pfrom.GetId (), pfrom.LogIP ( fLogIPs ),
36243620 (mapped_as ? strprintf (" , mapped_as=%d" , mapped_as) : " " ));
36253621 }
36263622
0 commit comments