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

Method ForNode

src/net.cpp:3105–3116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3103}
3104
3105bool CConnman::ForNode(NodeId id, std::function<bool(CNode* pnode)> func)
3106{
3107 CNode* found = nullptr;
3108 LOCK(m_nodes_mutex);
3109 for (auto&& pnode : m_nodes) {
3110 if(pnode->GetId() == id) {
3111 found = pnode;
3112 break;
3113 }
3114 }
3115 return found != nullptr && NodeFullyConnected(found) && func(found);
3116}
3117
3118CSipHasher CConnman::GetDeterministicRandomizer(uint64_t id) const
3119{

Callers 4

FetchBlockMethod · 0.80
FUZZ_TARGET_INITFunction · 0.80

Calls 1

GetIdMethod · 0.80

Tested by 1

FUZZ_TARGET_INITFunction · 0.64