diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-11-23 18:07:00 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-12-15 17:45:48 +0100 |
commit | fa3d62cf7b3501a056b34c5458c14d2fe6a55bd7 (patch) | |
tree | 36896fec7741ad366d51a3f857ef801124c7f731 /src/net_processing.cpp | |
parent | c09b41dc665bcc7d6dcc464f1d279e8eca598c8d (diff) |
Move FindForkInGlobalIndex from BlockManager to CChainState
The helper was moved in commit b026e318c39f59a06e29f1b25c7f577e01b25ccb,
which also mentioned that it could be moved to CChainState. So do that,
as the functionality is not block-storage related.
This also allows to drop one function argument.
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r-- | src/net_processing.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 2a30afdb5b..d4f0e94056 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -3083,7 +3083,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) @@ -3203,7 +3203,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); } |