diff options
| author | Pieter Wuille <[email protected]> | 2016-04-04 13:35:26 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-04-07 12:13:10 +0200 |
| commit | 0e24bbf679c95784ed5514a6a1f2fbf99dd97725 (patch) | |
| tree | d17bf024bc51afab2e69ff7253bde4e880ad5747 /src/main.cpp | |
| parent | Track block download times per individual block (diff) | |
| download | discoin-0e24bbf679c95784ed5514a6a1f2fbf99dd97725.tar.xz discoin-0e24bbf679c95784ed5514a6a1f2fbf99dd97725.zip | |
Self check after the last peer is removed
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index de74593bb..87c727b28 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -338,6 +338,13 @@ void FinalizeNode(NodeId nodeid) { assert(nPeersWithValidatedDownloads >= 0); 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. |