mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-17 18:40:09 +00:00
Self check after the last peer is removed
This commit is contained in:
parent
2d1d6581ec
commit
0e24bbf679
@ -338,6 +338,13 @@ void FinalizeNode(NodeId nodeid) {
|
|||||||
assert(nPeersWithValidatedDownloads >= 0);
|
assert(nPeersWithValidatedDownloads >= 0);
|
||||||
|
|
||||||
mapNodeState.erase(nodeid);
|
mapNodeState.erase(nodeid);
|
||||||
|
|
||||||
|
if (mapNodeState.empty()) {
|
||||||
|
// Do a consistency check after the last peer is removed.
|
||||||
|
assert(mapBlocksInFlight.empty());
|
||||||
|
assert(nPreferredDownload == 0);
|
||||||
|
assert(nPeersWithValidatedDownloads == 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Requires cs_main.
|
// Requires cs_main.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user