MCPcopy Create free account
hub / github.com/ElementsProject/elements / InitializeNode

Method InitializeNode

src/net_processing.cpp:1198–1211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1196}
1197
1198void PeerManagerImpl::InitializeNode(const CNode *pnode)
1199{
1200 NodeId nodeid = pnode->GetId();
1201 {
1202 LOCK(cs_main);
1203 mapNodeState.emplace_hint(mapNodeState.end(), std::piecewise_construct, std::forward_as_tuple(nodeid), std::forward_as_tuple(pnode->IsInboundConn()));
1204 assert(m_txrequest.Count(nodeid) == 0);
1205 }
1206 {
1207 PeerRef peer = std::make_shared<Peer>(nodeid);
1208 LOCK(m_peer_mutex);
1209 m_peer_map.emplace_hint(m_peer_map.end(), nodeid, std::move(peer));
1210 }
1211}
1212
1213void PeerManagerImpl::ReattemptInitialBroadcast(CScheduler& scheduler)
1214{

Callers 7

OpenNetworkConnectionMethod · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
AddRandomOutboundPeerFunction · 0.80
fuzz_targetFunction · 0.80
FUZZ_TARGET_INITFunction · 0.80

Calls 4

GetIdMethod · 0.80
IsInboundConnMethod · 0.80
endMethod · 0.45
CountMethod · 0.45

Tested by 5

BOOST_AUTO_TEST_CASEFunction · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64
AddRandomOutboundPeerFunction · 0.64
fuzz_targetFunction · 0.64
FUZZ_TARGET_INITFunction · 0.64