diff options
-rw-r--r-- | doc/release-notes-27307.md | 8 | ||||
-rw-r--r-- | src/wallet/rpc/transactions.cpp | 4 | ||||
-rwxr-xr-x | test/functional/wallet_conflicts.py | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/doc/release-notes-27307.md b/doc/release-notes-27307.md new file mode 100644 index 0000000000..58fc7098b5 --- /dev/null +++ b/doc/release-notes-27307.md @@ -0,0 +1,8 @@ +Wallet +--- + +The wallet now detects when wallet transactions conflict with the mempool. Mempool +conflicting transactions can be seen in the `"mempoolconflicts"` field of +`gettransaction`. The inputs of mempool conflicted transactions can now be respent +without manually abandoning the transactions when the parent transaction is dropped +from the mempool, which can cause wallet balances to appear higher. diff --git a/src/wallet/rpc/transactions.cpp b/src/wallet/rpc/transactions.cpp index 5abc983701..0dacfa808b 100644 --- a/src/wallet/rpc/transactions.cpp +++ b/src/wallet/rpc/transactions.cpp @@ -415,13 +415,13 @@ static std::vector<RPCResult> TransactionDescriptionString() {RPCResult::Type::NUM_TIME, "blocktime", /*optional=*/true, "The block time expressed in " + UNIX_EPOCH_TIME + "."}, {RPCResult::Type::STR_HEX, "txid", "The transaction id."}, {RPCResult::Type::STR_HEX, "wtxid", "The hash of serialized transaction, including witness data."}, - {RPCResult::Type::ARR, "walletconflicts", "Conflicting transaction ids.", + {RPCResult::Type::ARR, "walletconflicts", "Confirmed transactions that have been detected by the wallet to conflict with this transaction.", { {RPCResult::Type::STR_HEX, "txid", "The transaction id."}, }}, {RPCResult::Type::STR_HEX, "replaced_by_txid", /*optional=*/true, "Only if 'category' is 'send'. The txid if this tx was replaced."}, {RPCResult::Type::STR_HEX, "replaces_txid", /*optional=*/true, "Only if 'category' is 'send'. The txid if this tx replaces another."}, - {RPCResult::Type::ARR, "mempoolconflicts", "Transactions that directly conflict with either this transaction or an ancestor transaction", + {RPCResult::Type::ARR, "mempoolconflicts", "Transactions in the mempool that directly conflict with either this transaction or an ancestor transaction", { {RPCResult::Type::STR_HEX, "txid", "The transaction id."}, }}, diff --git a/test/functional/wallet_conflicts.py b/test/functional/wallet_conflicts.py index e5739a6a59..25a95aa954 100755 --- a/test/functional/wallet_conflicts.py +++ b/test/functional/wallet_conflicts.py @@ -9,7 +9,6 @@ Test that wallet correctly tracks transactions that have been conflicted by bloc from decimal import Decimal -from test_framework.blocktools import COINBASE_MATURITY from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, @@ -37,7 +36,6 @@ class TxConflicts(BitcoinTestFramework): """ self.test_block_conflicts() - self.generatetoaddress(self.nodes[0], COINBASE_MATURITY + 7, self.nodes[2].getnewaddress()) self.test_mempool_conflict() self.test_mempool_and_block_conflicts() self.test_descendants_with_mempool_conflicts() |