mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 10:42:13 +02:00
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
This commit is contained in:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user