mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
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:
parent
855b1fc2b9
commit
48cd9171bb
1 changed files with 1 additions and 3 deletions
|
@ -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())];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue