mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-17 11:00:44 +01:00
refactor: more const annotations for uses of CBlockIndex*
This commit is contained in:
@@ -67,7 +67,7 @@ static void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue&
|
||||
LOCK(cs_main);
|
||||
|
||||
entry.pushKV("blockhash", hashBlock.GetHex());
|
||||
CBlockIndex* pindex = active_chainstate.m_blockman.LookupBlockIndex(hashBlock);
|
||||
const CBlockIndex* pindex = active_chainstate.m_blockman.LookupBlockIndex(hashBlock);
|
||||
if (pindex) {
|
||||
if (active_chainstate.m_chain.Contains(pindex)) {
|
||||
entry.pushKV("confirmations", 1 + active_chainstate.m_chain.Height() - pindex->nHeight);
|
||||
@@ -207,7 +207,7 @@ static RPCHelpMan getrawtransaction()
|
||||
|
||||
bool in_active_chain = true;
|
||||
uint256 hash = ParseHashV(request.params[0], "parameter 1");
|
||||
CBlockIndex* blockindex = nullptr;
|
||||
const CBlockIndex* blockindex = nullptr;
|
||||
|
||||
if (hash == Params().GenesisBlock().hashMerkleRoot) {
|
||||
// Special exception for the genesis block coinbase transaction
|
||||
@@ -302,7 +302,7 @@ static RPCHelpMan gettxoutproof()
|
||||
}
|
||||
}
|
||||
|
||||
CBlockIndex* pblockindex = nullptr;
|
||||
const CBlockIndex* pblockindex = nullptr;
|
||||
uint256 hashBlock;
|
||||
ChainstateManager& chainman = EnsureAnyChainman(request.context);
|
||||
if (!request.params[1].isNull()) {
|
||||
|
||||
Reference in New Issue
Block a user