MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / ForNode

Method ForNode

src/net.cpp:4200–4213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4198}
4199
4200bool CConnman::ForNode(NodeId id, std::function<bool(CNode* pnode)> func)
4201{
4202 AssertLockNotHeld(m_nodes_mutex);
4203
4204 CNode* found = nullptr;
4205 LOCK(m_nodes_mutex);
4206 for (auto&& pnode : m_nodes) {
4207 if(pnode->GetId() == id) {
4208 found = pnode;
4209 break;
4210 }
4211 }
4212 return found != nullptr && NodeFullyConnected(found) && func(found);
4213}
4214
4215CSipHasher CConnman::GetDeterministicRandomizer(uint64_t id) const
4216{

Callers 5

FetchBlockMethod · 0.80
connman.cppFile · 0.80
sendmsgtopeerFunction · 0.80

Calls 1

GetIdMethod · 0.80

Tested by

no test coverage detected