From 301bc7bc7e83f4c268c1722558b07dbb5b55fa92 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Mon, 8 Feb 2016 15:32:29 -0500 Subject: [PATCH] Update nQueuedValidatedHeaders after peer disconnection --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;