Merge 601bfc417d into merged_master (Bitcoin PR bitcoin/bitcoin#24515)

This commit is contained in:
Byron Hambly 2023-10-16 10:58:18 +00:00
commit fa21dc5b5d
10 changed files with 155 additions and 130 deletions

View file

@ -63,7 +63,7 @@ void RegenerateCommitments(CBlock& block, ChainstateManager& chainman)
tx.witness.vtxoutwit.erase(tx.witness.vtxoutwit.begin() + GetWitnessCommitmentIndex(block));
block.vtx.at(0) = MakeTransactionRef(tx);
CBlockIndex* prev_block = WITH_LOCK(::cs_main, return chainman.m_blockman.LookupBlockIndex(block.hashPrevBlock));
const CBlockIndex* prev_block = WITH_LOCK(::cs_main, return chainman.m_blockman.LookupBlockIndex(block.hashPrevBlock));
GenerateCoinbaseCommitment(block, prev_block, Params().GetConsensus());
block.hashMerkleRoot = BlockMerkleRoot(block);