validation: move UpdateUncommittedBlockStructures and GenerateCoinbaseCommitment into ChainstateManager

This commit is contained in:
Anthony Towns
2022-01-19 04:10:26 +10:00
parent 5c67e84d37
commit eaa2e3f25c
6 changed files with 15 additions and 15 deletions

View File

@@ -89,7 +89,7 @@ std::shared_ptr<CBlock> MinerTestingSetup::Block(const uint256& prev_hash)
std::shared_ptr<CBlock> MinerTestingSetup::FinalizeBlock(std::shared_ptr<CBlock> pblock)
{
const CBlockIndex* prev_block{WITH_LOCK(::cs_main, return m_node.chainman->m_blockman.LookupBlockIndex(pblock->hashPrevBlock))};
GenerateCoinbaseCommitment(*pblock, prev_block, Params().GetConsensus());
m_node.chainman->GenerateCoinbaseCommitment(*pblock, prev_block);
pblock->hashMerkleRoot = BlockMerkleRoot(*pblock);