Merge 8c0bd871fc into merged_master (Bitcoin PR bitcoin/bitcoin#23785)

This commit is contained in:
Byron Hambly 2023-06-13 14:30:53 +00:00
commit 413786c613
5 changed files with 78 additions and 75 deletions

View file

@ -3134,7 +3134,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
LOCK(cs_main);
// Find the last block the caller has in the main chain
const CBlockIndex* pindex = m_chainman.m_blockman.FindForkInGlobalIndex(m_chainman.ActiveChain(), locator);
const CBlockIndex* pindex = m_chainman.ActiveChainstate().FindForkInGlobalIndex(locator);
// Send the rest of the chain
if (pindex)
@ -3254,7 +3254,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
else
{
// Find the last block the caller has in the main chain
pindex = m_chainman.m_blockman.FindForkInGlobalIndex(m_chainman.ActiveChain(), locator);
pindex = m_chainman.ActiveChainstate().FindForkInGlobalIndex(locator);
if (pindex)
pindex = m_chainman.ActiveChain().Next(pindex);
}