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

Function GetNodeStateStats

src/main.cpp:167–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165
166
167bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) {
168 LOCK(cs_mapNodeState);
169 CNodeState *state = State(nodeid);
170 if (state == nullptr)
171 return false;
172
173 stats.nMisbehavior = state->nMisbehavior;
174 return true;
175}
176
177void RegisterNodeSignals(CNodeSignals &nodeSignals) {
178 nodeSignals.GetHeight.connect(&GetHeight);

Callers 1

getpeerinfoFunction · 0.85

Calls 1

StateFunction · 0.50

Tested by

no test coverage detected