aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorSuhas Daftuar <[email protected]>2016-02-08 15:32:29 -0500
committerSuhas Daftuar <[email protected]>2016-02-08 15:50:52 -0500
commit301bc7bc7e83f4c268c1722558b07dbb5b55fa92 (patch)
treeee0519aa022d5db07bc26aa9fc92115741b165bb /src/main.cpp
parentMerge #7225: Eliminate unnecessary call to CheckBlock (diff)
downloaddiscoin-301bc7bc7e83f4c268c1722558b07dbb5b55fa92.tar.xz
discoin-301bc7bc7e83f4c268c1722558b07dbb5b55fa92.zip
Update nQueuedValidatedHeaders after peer disconnection
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 984523408..94071d381 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -332,8 +332,10 @@ void FinalizeNode(NodeId nodeid) {
AddressCurrentlyConnected(state->address);
}
- BOOST_FOREACH(const QueuedBlock& entry, state->vBlocksInFlight)
+ BOOST_FOREACH(const QueuedBlock& entry, state->vBlocksInFlight) {
+ nQueuedValidatedHeaders -= entry.fValidatedHeaders;
mapBlocksInFlight.erase(entry.hash);
+ }
EraseOrphansFor(nodeid);
nPreferredDownload -= state->fPreferredDownload;