mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Merge 30e8a79aef into merged_master (Bitcoin PR bitcoin/bitcoin#30482)
This commit is contained in:
commit
985fd76510
16 changed files with 98 additions and 82 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue