mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 06:52:36 +01:00
Merge bitcoin/bitcoin#23080: test: check abandoned tx in listsinceblock
bda620aecd
test: check abandoned tx in listsinceblock (brunoerg) Pull request description: This PR tests if the abandoned transaction is correct in listsinceblock return (wallet_abandonconflict.py). ACKs for top commit: jonatack: ACKbda620aecd
theStack: ACKbda620aecd
stratospher: Tested ACKbda620a
. This PR verifies whether the transaction txAB1 has been abandoned in listsinceblock and is a nice addition to the test! Tree-SHA512: e4dce344cf621de7a8b5bd8660d252419772a293080fc881f6f448b6df85c6b1c8f0df619e855a40b6393f53c836f0d7fadbd3916c20cccd3a95830b8b502991
This commit is contained in:
commit
ef596923a8
1 changed files with 8 additions and 0 deletions
|
@ -120,6 +120,14 @@ class AbandonConflictTest(BitcoinTestFramework):
|
||||||
assert_equal(newbalance, balance + Decimal("30"))
|
assert_equal(newbalance, balance + Decimal("30"))
|
||||||
balance = newbalance
|
balance = newbalance
|
||||||
|
|
||||||
|
self.log.info("Check abandoned transactions in listsinceblock")
|
||||||
|
listsinceblock = self.nodes[0].listsinceblock()
|
||||||
|
txAB1_listsinceblock = [d for d in listsinceblock['transactions'] if d['txid'] == txAB1 and d['category'] == 'send']
|
||||||
|
for tx in txAB1_listsinceblock:
|
||||||
|
assert_equal(tx['abandoned'], True)
|
||||||
|
assert_equal(tx['confirmations'], 0)
|
||||||
|
assert_equal(tx['trusted'], False)
|
||||||
|
|
||||||
# Verify that even with a low min relay fee, the tx is not reaccepted from wallet on startup once abandoned
|
# Verify that even with a low min relay fee, the tx is not reaccepted from wallet on startup once abandoned
|
||||||
self.restart_node(0, extra_args=["-minrelaytxfee=0.00001"])
|
self.restart_node(0, extra_args=["-minrelaytxfee=0.00001"])
|
||||||
assert self.nodes[0].getmempoolinfo()['loaded']
|
assert self.nodes[0].getmempoolinfo()['loaded']
|
||||||
|
|
Loading…
Add table
Reference in a new issue