diff options
author | Carl Dong <contact@carldong.me> | 2020-09-15 15:26:36 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2021-01-28 14:15:26 -0500 |
commit | 5f8cd7b3a527999512161956db4d718688cb956f (patch) | |
tree | b90e409cee9deb189cad076e0cfde747525666c6 /src/net_processing.cpp | |
parent | 2a696472a1423e877bfa83f016f66c7e45be7369 (diff) | |
download | bitcoin-5f8cd7b3a527999512161956db4d718688cb956f.tar.xz |
validation: Remove global ::ActivateBestChain
Instead use CChainState::ActivateBestChain, which is what the global one
calls anyway.
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 fb013a0deb..087f35251a 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -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()); } } |