p2p: remove extra logic for assumeutxo

This reverts commit 49d569cb1f
which introduced extra logic for when a snapshot was loaded.
With the previous commit, this is not longer necessary
because the more general logic of advancing pindexLastCommonBlock
also covers this case.
This commit is contained in:
Martin Zumsande 2025-03-31 17:42:17 -04:00
parent 855b1fc2b9
commit 48cd9171bb

View file

@ -1367,9 +1367,7 @@ void PeerManagerImpl::FindNextBlocksToDownload(const Peer& peer, unsigned int co
// Bootstrap quickly by guessing a parent of our best tip is the forking point.
// Guessing wrong in either direction is not a problem.
// Also reset pindexLastCommonBlock after a snapshot was loaded, so that blocks after the snapshot will be prioritised for download.
if (state->pindexLastCommonBlock == nullptr ||
(snap_base && state->pindexLastCommonBlock->nHeight < snap_base->nHeight)) {
if (state->pindexLastCommonBlock == nullptr) {
state->pindexLastCommonBlock = m_chainman.ActiveChain()[std::min(state->pindexBestKnownBlock->nHeight, m_chainman.ActiveChain().Height())];
}