Merge 30e8a79aef into merged_master (Bitcoin PR bitcoin/bitcoin#30482)

This commit is contained in:
ivanlele 2026-03-10 11:29:20 +00:00
commit 985fd76510
No known key found for this signature in database
16 changed files with 98 additions and 82 deletions

View file

@ -366,13 +366,11 @@ static RPCHelpMan generateblock()
std::vector<CTransactionRef> txs;
const auto raw_txs_or_txids = request.params[1].get_array();
for (size_t i = 0; i < raw_txs_or_txids.size(); i++) {
const auto str(raw_txs_or_txids[i].get_str());
const auto& str{raw_txs_or_txids[i].get_str()};
uint256 hash;
CMutableTransaction mtx;
if (ParseHashStr(str, hash)) {
const auto tx = mempool.get(hash);
if (auto hash{uint256::FromHex(str)}) {
const auto tx{mempool.get(*hash)};
if (!tx) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Transaction %s not in mempool.", str));
}