mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
refactor: more const annotations for uses of CBlockIndex*
This commit is contained in:
parent
430acb7d2a
commit
5be9ee3c54
10 changed files with 26 additions and 25 deletions
|
|
@ -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()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue