MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / FinalizeNode

Function FinalizeNode

src/p2p/node.cpp:37–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void FinalizeNode(NodeId nodeid) {
38 LOCK(cs_mapNodeState);
39 CNodeState *state = State(nodeid);
40
41 for (const auto &entry : state->vBlocksInFlight)
42 mapBlocksInFlight.erase(entry.hash);
43
44 for (const auto &hash : state->vBlocksToDownload)
45 mapBlocksToDownload.erase(hash);
46
47 mapNodeState.erase(nodeid);
48}
49
50// Requires cs_mapNodeState.
51CNodeState *State(NodeId pNode) {

Callers

nothing calls this directly

Calls 2

StateFunction · 0.70
eraseMethod · 0.45

Tested by

no test coverage detected