Skip to content

Commit e16f5b4

Browse files
sdaftuarlaanwj
authored andcommitted
Update nQueuedValidatedHeaders after peer disconnection
Github-Pull: #7482 Rebased-From: 301bc7b
1 parent b2f2b85 commit e16f5b4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,10 @@ void FinalizeNode(NodeId nodeid) {
331331
AddressCurrentlyConnected(state->address);
332332
}
333333

334-
BOOST_FOREACH(const QueuedBlock& entry, state->vBlocksInFlight)
334+
BOOST_FOREACH(const QueuedBlock& entry, state->vBlocksInFlight) {
335+
nQueuedValidatedHeaders -= entry.fValidatedHeaders;
335336
mapBlocksInFlight.erase(entry.hash);
337+
}
336338
EraseOrphansFor(nodeid);
337339
nPreferredDownload -= state->fPreferredDownload;
338340

0 commit comments

Comments
 (0)