mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Merge 38f4b0d9d1 into merged_master (Bitcoin PR bitcoin/bitcoin#28562)
This commit is contained in:
commit
e9d955b25a
18 changed files with 73 additions and 73 deletions
|
|
@ -1455,7 +1455,7 @@ void PeerManagerImpl::FindNextBlocks(std::vector<const CBlockIndex*>& vBlocks, c
|
|||
return;
|
||||
}
|
||||
if (pindex->nStatus & BLOCK_HAVE_DATA || (activeChain && activeChain->Contains(pindex))) {
|
||||
if (activeChain && pindex->HaveTxsDownloaded())
|
||||
if (activeChain && pindex->HaveNumChainTxs())
|
||||
state->pindexLastCommonBlock = pindex;
|
||||
} else if (!IsBlockRequested(pindex->GetBlockHash())) {
|
||||
// The block is not already downloaded, and not yet in flight.
|
||||
|
|
@ -1941,6 +1941,8 @@ void PeerManagerImpl::BlockConnected(
|
|||
}
|
||||
}
|
||||
|
||||
// The following task can be skipped since we don't maintain a mempool for
|
||||
// the ibd/background chainstate.
|
||||
if (role == ChainstateRole::BACKGROUND) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -2235,7 +2237,7 @@ void PeerManagerImpl::ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv&
|
|||
LOCK(cs_main);
|
||||
const CBlockIndex* pindex = m_chainman.m_blockman.LookupBlockIndex(inv.hash);
|
||||
if (pindex) {
|
||||
if (pindex->HaveTxsDownloaded() && !pindex->IsValid(BLOCK_VALID_SCRIPTS) &&
|
||||
if (pindex->HaveNumChainTxs() && !pindex->IsValid(BLOCK_VALID_SCRIPTS) &&
|
||||
pindex->IsValid(BLOCK_VALID_TREE)) {
|
||||
// If we have the block and all of its parents, but have not yet validated it,
|
||||
// we might be in the middle of connecting it (ie in the unlock of cs_main
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue