Skip to content

Commit 74d6115

Browse files
committed
Merge bitcoin/bitcoin#30365: #27307 follow-up: update mempool conflict tests + docs
7d55796 wallet: update mempool conflicts tests + docs (ishaanam) Pull request description: #27307 follow-up: - updates description of `mempoolconflicts` and `walletconflicts` in `gettransaction` - adds release notes for 27307 - removes unnecessary line from `wallet_conflicts.py` ACKs for top commit: fjahr: ACK 7d55796 achow101: ACK 7d55796 furszy: utACK 7d55796 tdb3: ACK 7d55796 Tree-SHA512: b3c368c7072cacdaf5fd18ecb0a88ab76ce02f65d56fce55a3316afa0989b9417c31e563aa8d9dd8f6294add154b4fdeb4ada5081c6b8a5fe9953f0e8a4812f4
2 parents be63674 + 7d55796 commit 74d6115

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

doc/release-notes-27307.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Wallet
2+
---
3+
4+
The wallet now detects when wallet transactions conflict with the mempool. Mempool
5+
conflicting transactions can be seen in the `"mempoolconflicts"` field of
6+
`gettransaction`. The inputs of mempool conflicted transactions can now be respent
7+
without manually abandoning the transactions when the parent transaction is dropped
8+
from the mempool, which can cause wallet balances to appear higher.

src/wallet/rpc/transactions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,13 +415,13 @@ static std::vector<RPCResult> TransactionDescriptionString()
415415
{RPCResult::Type::NUM_TIME, "blocktime", /*optional=*/true, "The block time expressed in " + UNIX_EPOCH_TIME + "."},
416416
{RPCResult::Type::STR_HEX, "txid", "The transaction id."},
417417
{RPCResult::Type::STR_HEX, "wtxid", "The hash of serialized transaction, including witness data."},
418-
{RPCResult::Type::ARR, "walletconflicts", "Conflicting transaction ids.",
418+
{RPCResult::Type::ARR, "walletconflicts", "Confirmed transactions that have been detected by the wallet to conflict with this transaction.",
419419
{
420420
{RPCResult::Type::STR_HEX, "txid", "The transaction id."},
421421
}},
422422
{RPCResult::Type::STR_HEX, "replaced_by_txid", /*optional=*/true, "Only if 'category' is 'send'. The txid if this tx was replaced."},
423423
{RPCResult::Type::STR_HEX, "replaces_txid", /*optional=*/true, "Only if 'category' is 'send'. The txid if this tx replaces another."},
424-
{RPCResult::Type::ARR, "mempoolconflicts", "Transactions that directly conflict with either this transaction or an ancestor transaction",
424+
{RPCResult::Type::ARR, "mempoolconflicts", "Transactions in the mempool that directly conflict with either this transaction or an ancestor transaction",
425425
{
426426
{RPCResult::Type::STR_HEX, "txid", "The transaction id."},
427427
}},

test/functional/wallet_conflicts.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
from decimal import Decimal
1111

12-
from test_framework.blocktools import COINBASE_MATURITY
1312
from test_framework.test_framework import BitcoinTestFramework
1413
from test_framework.util import (
1514
assert_equal,
@@ -37,7 +36,6 @@ def run_test(self):
3736
"""
3837

3938
self.test_block_conflicts()
40-
self.generatetoaddress(self.nodes[0], COINBASE_MATURITY + 7, self.nodes[2].getnewaddress())
4139
self.test_mempool_conflict()
4240
self.test_mempool_and_block_conflicts()
4341
self.test_descendants_with_mempool_conflicts()

0 commit comments

Comments
 (0)