diff options
author | Anthony Towns <aj@erisian.com.au> | 2022-01-18 21:49:30 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2022-05-10 12:09:33 +1000 |
commit | 38860f93b680f152fc6fc3d9ae574a4c0659e775 (patch) | |
tree | acc29f37fd6d9f96aa10ed59bf588ac51734989b /src/rpc | |
parent | 69675ea4e73dcf5e9dd0f94802bd3463e4262081 (diff) |
validation: remove redundant CChainParams params from ChainstateManager methods
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/mining.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index b552528951..2585c28fb8 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -133,7 +133,7 @@ static bool GenerateBlock(ChainstateManager& chainman, CBlock& block, uint64_t& } std::shared_ptr<const CBlock> shared_pblock = std::make_shared<const CBlock>(block); - if (!chainman.ProcessNewBlock(chainparams, shared_pblock, true, nullptr)) { + if (!chainman.ProcessNewBlock(shared_pblock, true, nullptr)) { throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted"); } @@ -1000,7 +1000,7 @@ static RPCHelpMan submitblock() bool new_block; auto sc = std::make_shared<submitblock_StateCatcher>(block.GetHash()); RegisterSharedValidationInterface(sc); - bool accepted = chainman.ProcessNewBlock(Params(), blockptr, /*force_processing=*/true, /*new_block=*/&new_block); + bool accepted = chainman.ProcessNewBlock(blockptr, /*force_processing=*/true, /*new_block=*/&new_block); UnregisterSharedValidationInterface(sc); if (!new_block && accepted) { return "duplicate"; @@ -1042,7 +1042,7 @@ static RPCHelpMan submitheader() } BlockValidationState state; - chainman.ProcessNewBlockHeaders({h}, state, Params()); + chainman.ProcessNewBlockHeaders({h}, state); if (state.IsValid()) return NullUniValue; if (state.IsError()) { throw JSONRPCError(RPC_VERIFY_ERROR, state.ToString()); |