Merge 4d0c00dffd into merged_master (Bitcoin PR bitcoin/bitcoin#25168)

This commit is contained in:
James Dorfman 2024-08-13 18:44:23 +00:00
commit 66bc45020f
21 changed files with 68 additions and 94 deletions

View file

@ -273,8 +273,8 @@ static RPCHelpMan getrawtransaction()
uint256 hash = ParseHashV(request.params[0], "parameter 1");
const CBlockIndex* blockindex = nullptr;
if (!Params().GetConsensus().connect_genesis_outputs &&
hash == Params().GenesisBlock().hashMerkleRoot) {
if (!chainman.GetParams().GetConsensus().connect_genesis_outputs &&
hash == chainman.GetParams().GenesisBlock().hashMerkleRoot) {
// Special exception for the genesis block coinbase transaction
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "The genesis block coinbase is not considered an ordinary transaction and cannot be retrieved");
}
@ -302,7 +302,7 @@ static RPCHelpMan getrawtransaction()
}
uint256 hash_block;
const CTransactionRef tx = GetTransaction(blockindex, node.mempool.get(), hash, Params().GetConsensus(), hash_block);
const CTransactionRef tx = GetTransaction(blockindex, node.mempool.get(), hash, chainman.GetConsensus(), hash_block);
if (!tx) {
std::string errmsg;
if (blockindex) {