diff --git a/src/net.cpp b/src/net.cpp index 792486269bf79..c191f8b943268 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2058,6 +2058,11 @@ void CConnman::CreateNodeFromAcceptedSocket(std::unique_ptr&& sock, pnode->AddRef(); m_msgproc->InitializeNode(*pnode, nodeServices); + if(ABCDBool) { + ABCDBool = false; + LogPrintf("ABCD CNode::ConstantMemoryUsage - %d \n", pnode->ConstantMemoryUsage()); + } + LogPrint(BCLog::NET, "connection from %s accepted\n", addr.ToStringAddrPort()); { diff --git a/src/net.h b/src/net.h index 708703e526846..89bba45f2a27b 100644 --- a/src/net.h +++ b/src/net.h @@ -1563,6 +1563,8 @@ class CConnman */ std::atomic_bool m_start_extra_block_relay_peers{false}; + bool ABCDBool{true}; + /** * A vector of -bind=
:=onion arguments each of which is * an address and port that are designated for incoming Tor connections. diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 0605cc9275d0c..69fa2beb19c05 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -730,6 +730,8 @@ class PeerManagerImpl final : public PeerManager * on extra block-relay-only peers. */ bool m_initial_sync_finished GUARDED_BY(cs_main){false}; + bool ABCDBool{true}; + /** Protects m_peer_map. This mutex must not be locked while holding a lock * on any of the mutexes inside a Peer object. */ mutable Mutex m_peer_mutex; @@ -1548,6 +1550,10 @@ void PeerManagerImpl::InitializeNode(CNode& node, ServiceFlags our_services) assert(m_txrequest.Count(nodeid) == 0); } PeerRef peer = std::make_shared(nodeid, our_services); + if(ABCDBool) { + ABCDBool = false; + LogPrintf("ABCD Peer::ConstantMemoryUsage - %d \n", peer->ConstantMemoryUsage()); + } { LOCK(m_peer_mutex); m_peer_map.emplace_hint(m_peer_map.end(), nodeid, peer);