mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-17 00:13:17 +02:00
validation: Remove global ::ActivateBestChain
Instead use CChainState::ActivateBestChain, which is what the global one calls anyway.
This commit is contained in:
@ -1700,7 +1700,7 @@ void static ProcessGetBlockData(CNode& pfrom, Peer& peer, const CChainParams& ch
|
||||
} // release cs_main before calling ActivateBestChain
|
||||
if (need_activate_chain) {
|
||||
BlockValidationState state;
|
||||
if (!ActivateBestChain(state, chainparams, a_recent_block)) {
|
||||
if (!::ChainstateActive().ActivateBestChain(state, chainparams, a_recent_block)) {
|
||||
LogPrint(BCLog::NET, "failed to activate chain (%s)\n", state.ToString());
|
||||
}
|
||||
}
|
||||
@ -2960,7 +2960,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
a_recent_block = most_recent_block;
|
||||
}
|
||||
BlockValidationState state;
|
||||
if (!ActivateBestChain(state, m_chainparams, a_recent_block)) {
|
||||
if (!::ChainstateActive().ActivateBestChain(state, m_chainparams, a_recent_block)) {
|
||||
LogPrint(BCLog::NET, "failed to activate chain (%s)\n", state.ToString());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user