aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2016-02-08 15:32:29 -0500
committerSuhas Daftuar <sdaftuar@gmail.com>2016-02-08 15:50:52 -0500
commit301bc7bc7e83f4c268c1722558b07dbb5b55fa92 (patch)
treeee0519aa022d5db07bc26aa9fc92115741b165bb /src
parenteb331794a22b86da0a76d6710cb3eb37903a486e (diff)
downloadbitcoin-301bc7bc7e83f4c268c1722558b07dbb5b55fa92.tar.xz
Update nQueuedValidatedHeaders after peer disconnection
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 9845234084..94071d3816 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;