| 165 | |
| 166 | |
| 167 | bool 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 | |
| 177 | void RegisterNodeSignals(CNodeSignals &nodeSignals) { |
| 178 | nodeSignals.GetHeight.connect(&GetHeight); |