mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge 91ccb62faa into merged_master (Bitcoin PR bitcoin/bitcoin#25158)
This commit is contained in:
commit
83370fca8a
3 changed files with 15 additions and 6 deletions
6
doc/release-notes-25158.md
Normal file
6
doc/release-notes-25158.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
RPC Wallet
|
||||
----------
|
||||
|
||||
- The `gettransaction`, `listtransactions`, `listsinceblock` RPCs now return
|
||||
the `abandoned` field for all transactions. Previously, the "abandoned" field
|
||||
was only returned for sent transactions. (#25158)
|
||||
|
|
@ -425,6 +425,7 @@ static void ListTransactions(const CWallet& wallet, const CWalletTx& wtx, int nM
|
|||
entry.pushKV("label", label);
|
||||
}
|
||||
entry.pushKV("vout", r.vout);
|
||||
entry.pushKV("abandoned", wtx.isAbandoned());
|
||||
if (fLong)
|
||||
WalletTxToJSON(wallet, wtx, entry);
|
||||
ret.push_back(entry);
|
||||
|
|
@ -498,8 +499,7 @@ RPCHelpMan listtransactions()
|
|||
},
|
||||
TransactionDescriptionString()),
|
||||
{
|
||||
{RPCResult::Type::BOOL, "abandoned", /*optional=*/true, "'true' if the transaction has been abandoned (inputs are respendable). Only available for the \n"
|
||||
"'send' category of transactions."},
|
||||
{RPCResult::Type::BOOL, "abandoned", "'true' if the transaction has been abandoned (inputs are respendable)."},
|
||||
})},
|
||||
}
|
||||
},
|
||||
|
|
@ -612,8 +612,7 @@ RPCHelpMan listsinceblock()
|
|||
},
|
||||
TransactionDescriptionString()),
|
||||
{
|
||||
{RPCResult::Type::BOOL, "abandoned", /*optional=*/true, "'true' if the transaction has been abandoned (inputs are respendable). Only available for the \n"
|
||||
"'send' category of transactions."},
|
||||
{RPCResult::Type::BOOL, "abandoned", "'true' if the transaction has been abandoned (inputs are respendable)."},
|
||||
{RPCResult::Type::STR, "label", /*optional=*/true, "A comment for the address/transaction, if any"},
|
||||
})},
|
||||
}},
|
||||
|
|
@ -761,8 +760,7 @@ RPCHelpMan gettransaction()
|
|||
{RPCResult::Type::NUM, "vout", "the vout value"},
|
||||
{RPCResult::Type::STR_AMOUNT, "fee", /*optional=*/true, "The amount of the fee in " + CURRENCY_UNIT + ". This is negative and only available for the \n"
|
||||
"'send' category of transactions."},
|
||||
{RPCResult::Type::BOOL, "abandoned", /*optional=*/true, "'true' if the transaction has been abandoned (inputs are respendable). Only available for the \n"
|
||||
"'send' category of transactions."},
|
||||
{RPCResult::Type::BOOL, "abandoned", "'true' if the transaction has been abandoned (inputs are respendable)."},
|
||||
{RPCResult::Type::ARR, "parent_descs", /*optional=*/true, "Only if 'category' is 'received'. List of parent descriptors for the scriptPubKey of this coin.", {
|
||||
{RPCResult::Type::STR, "desc", "The descriptor string."},
|
||||
}},
|
||||
|
|
|
|||
|
|
@ -603,6 +603,11 @@ def test_unconfirmed_not_spendable(self, rbf_node, rbf_node_address):
|
|||
# Call abandon to make sure the wallet doesn't attempt to resubmit
|
||||
# the bump tx and hope the wallet does not rebroadcast before we call.
|
||||
rbf_node.abandontransaction(bumpid)
|
||||
|
||||
tx_bump_abandoned = rbf_node.gettransaction(bumpid)
|
||||
for tx in tx_bump_abandoned['details']:
|
||||
assert_equal(tx['abandoned'], True)
|
||||
|
||||
assert bumpid not in rbf_node.getrawmempool()
|
||||
assert rbfid in rbf_node.getrawmempool()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue