p2p: Forget peer's reconciliation state on disconnect

This commit is contained in:
Gleb Naumenko
2021-03-20 12:50:02 +02:00
parent 3fcf78ee6a
commit 4470acf076
3 changed files with 21 additions and 0 deletions

View File

@@ -1494,6 +1494,7 @@ void PeerManagerImpl::FinalizeNode(const CNode& node)
}
WITH_LOCK(g_cs_orphans, m_orphanage.EraseForPeer(nodeid));
m_txrequest.DisconnectedPeer(nodeid);
if (m_txreconciliation) m_txreconciliation->ForgetPeer(nodeid);
m_num_preferred_download_peers -= state->fPreferredDownload;
m_peers_downloading_from -= (state->nBlocksInFlight != 0);
assert(m_peers_downloading_from >= 0);