diff options
author | Anthony Towns <aj@erisian.com.au> | 2022-03-02 15:42:57 +1000 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2022-03-09 14:32:47 -0500 |
commit | 5be9ee3c54dcb396ff52fc8c8b7e4e6e39ec4a3b (patch) | |
tree | 8b28727e7425f6ffd9f7eb6d86c978befdbb1b23 /src/node/miner.cpp | |
parent | 430acb7d2a3272977d5a66bf9a09bcd55ffd15cc (diff) | |
download | bitcoin-5be9ee3c54dcb396ff52fc8c8b7e4e6e39ec4a3b.tar.xz |
refactor: more const annotations for uses of CBlockIndex*
Diffstat (limited to 'src/node/miner.cpp')
-rw-r--r-- | src/node/miner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node/miner.cpp b/src/node/miner.cpp index 7fe10ecabc..fbfa88c170 100644 --- a/src/node/miner.cpp +++ b/src/node/miner.cpp @@ -50,7 +50,7 @@ void RegenerateCommitments(CBlock& block, ChainstateManager& chainman) tx.vout.erase(tx.vout.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); |