aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-02-09 08:54:06 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2016-02-09 08:54:25 +0100
commit3ffe4b241ed4c7733a1ac8312fd3766e0d312d48 (patch)
tree57601fc915017ec17685cec321a2cd8baf591a26 /src/main.cpp
parent3db828f9516549f4b18f670b277d3a0301a5db8e (diff)
parent301bc7bc7e83f4c268c1722558b07dbb5b55fa92 (diff)
Merge #7482: [P2P] Ensure headers count is correct
301bc7b Update nQueuedValidatedHeaders after peer disconnection (Suhas Daftuar)
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 89b4b2930c..20539c1ba7 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;