mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
refactor: Remove chainparams arg from CChainState member functions
Passing this is confusing and redundant with the m_params member.
This commit is contained in:
@@ -1694,7 +1694,7 @@ void PeerManagerImpl::ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv&
|
||||
} // release cs_main before calling ActivateBestChain
|
||||
if (need_activate_chain) {
|
||||
BlockValidationState state;
|
||||
if (!m_chainman.ActiveChainstate().ActivateBestChain(state, m_chainparams, a_recent_block)) {
|
||||
if (!m_chainman.ActiveChainstate().ActivateBestChain(state, a_recent_block)) {
|
||||
LogPrint(BCLog::NET, "failed to activate chain (%s)\n", state.ToString());
|
||||
}
|
||||
}
|
||||
@@ -2920,7 +2920,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
a_recent_block = most_recent_block;
|
||||
}
|
||||
BlockValidationState state;
|
||||
if (!m_chainman.ActiveChainstate().ActivateBestChain(state, m_chainparams, a_recent_block)) {
|
||||
if (!m_chainman.ActiveChainstate().ActivateBestChain(state, a_recent_block)) {
|
||||
LogPrint(BCLog::NET, "failed to activate chain (%s)\n", state.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user