diff options
author | Suhas Daftuar <sdaftuar@gmail.com> | 2016-02-08 15:32:29 -0500 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-02-09 08:55:03 +0100 |
commit | e16f5b40c2a3ba6777c010d0b7ae711e4674cb9f (patch) | |
tree | 6618d0367f763b857ba4afbff01a04903a69e448 | |
parent | b2f2b85ad5f3456c0a14f36602122d393f01f7fe (diff) |
Update nQueuedValidatedHeaders after peer disconnection
Github-Pull: #7482
Rebased-From: 301bc7bc7e83f4c268c1722558b07dbb5b55fa92
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 359167961b..63517d54cf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -331,8 +331,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; |