aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_abandonconflict.py
diff options
context:
space:
mode:
authorishaanam <ishaana.misra@gmail.com>2023-05-17 20:56:25 -0400
committerishaanam <ishaana.misra@gmail.com>2024-03-20 15:05:34 -0400
commit54e07ee22ff16fc68583ade0d2b8ffffc81d444a (patch)
tree17a38ec6538b1954f724f00a6435a820e1144cd4 /test/functional/wallet_abandonconflict.py
parentd64922b5903e5ffc8d2ce0e6761f99f173b60800 (diff)
downloadbitcoin-54e07ee22ff16fc68583ade0d2b8ffffc81d444a.tar.xz
wallet: track mempool conflicts
Behavior changes are: - if a tx has a mempool conflict, the wallet will not attempt to rebroadcast it - if a txo is spent by a mempool-conflicted tx, that txo is no longer considered spent
Diffstat (limited to 'test/functional/wallet_abandonconflict.py')
-rwxr-xr-xtest/functional/wallet_abandonconflict.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/wallet_abandonconflict.py b/test/functional/wallet_abandonconflict.py
index 2691507773..bc48952431 100755
--- a/test/functional/wallet_abandonconflict.py
+++ b/test/functional/wallet_abandonconflict.py
@@ -232,7 +232,11 @@ class AbandonConflictTest(BitcoinTestFramework):
balance = newbalance
# Invalidate the block with the double spend. B & C's 10 BTC outputs should no longer be available
- self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash())
+ blk = self.nodes[0].getbestblockhash()
+ # mine 10 blocks so that when the blk is invalidated, the transactions are not
+ # returned to the mempool
+ self.generate(self.nodes[1], 10)
+ self.nodes[0].invalidateblock(blk)
assert_equal(alice.gettransaction(txAB1)["confirmations"], 0)
newbalance = alice.getbalance()
assert_equal(newbalance, balance - Decimal("20"))