mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-15 01:55:22 +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:
@@ -1706,7 +1706,7 @@ static RPCHelpMan preciousblock()
|
||||
}
|
||||
|
||||
BlockValidationState state;
|
||||
chainman.ActiveChainstate().PreciousBlock(state, Params(), pblockindex);
|
||||
chainman.ActiveChainstate().PreciousBlock(state, pblockindex);
|
||||
|
||||
if (!state.IsValid()) {
|
||||
throw JSONRPCError(RPC_DATABASE_ERROR, state.ToString());
|
||||
@@ -1743,10 +1743,10 @@ static RPCHelpMan invalidateblock()
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found");
|
||||
}
|
||||
}
|
||||
chainman.ActiveChainstate().InvalidateBlock(state, Params(), pblockindex);
|
||||
chainman.ActiveChainstate().InvalidateBlock(state, pblockindex);
|
||||
|
||||
if (state.IsValid()) {
|
||||
chainman.ActiveChainstate().ActivateBestChain(state, Params());
|
||||
chainman.ActiveChainstate().ActivateBestChain(state);
|
||||
}
|
||||
|
||||
if (!state.IsValid()) {
|
||||
@@ -1787,7 +1787,7 @@ static RPCHelpMan reconsiderblock()
|
||||
}
|
||||
|
||||
BlockValidationState state;
|
||||
chainman.ActiveChainstate().ActivateBestChain(state, Params());
|
||||
chainman.ActiveChainstate().ActivateBestChain(state);
|
||||
|
||||
if (!state.IsValid()) {
|
||||
throw JSONRPCError(RPC_DATABASE_ERROR, state.ToString());
|
||||
|
||||
Reference in New Issue
Block a user