validation: remove redundant CChainParams params from ChainstateManager methods

This commit is contained in:
Anthony Towns
2022-01-18 21:49:30 +10:00
parent 69675ea4e7
commit 38860f93b6
11 changed files with 32 additions and 36 deletions

View File

@@ -68,7 +68,7 @@ CTxIn MineBlock(const NodeContext& node, const CScript& coinbase_scriptPubKey)
assert(block->nNonce);
}
bool processed{Assert(node.chainman)->ProcessNewBlock(Params(), block, true, nullptr)};
bool processed{Assert(node.chainman)->ProcessNewBlock(block, true, nullptr)};
assert(processed);
return CTxIn{block->vtx[0]->GetHash(), 0};

View File

@@ -300,10 +300,9 @@ CBlock TestChain100Setup::CreateAndProcessBlock(
chainstate = &Assert(m_node.chainman)->ActiveChainstate();
}
const CChainParams& chainparams = Params();
const CBlock block = this->CreateBlock(txns, scriptPubKey, *chainstate);
std::shared_ptr<const CBlock> shared_pblock = std::make_shared<const CBlock>(block);
Assert(m_node.chainman)->ProcessNewBlock(chainparams, shared_pblock, true, nullptr);
Assert(m_node.chainman)->ProcessNewBlock(shared_pblock, true, nullptr);
return block;
}