Skip to content

Commit ef59692

Browse files
committed
Merge bitcoin/bitcoin#23080: test: check abandoned tx in listsinceblock
bda620a 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: ACK bda620a theStack: ACK bda620a stratospher: Tested ACK bda620a. This PR verifies whether the transaction txAB1 has been abandoned in listsinceblock and is a nice addition to the test! Tree-SHA512: e4dce344cf621de7a8b5bd8660d252419772a293080fc881f6f448b6df85c6b1c8f0df619e855a40b6393f53c836f0d7fadbd3916c20cccd3a95830b8b502991
2 parents 3bf40d0 + bda620a commit ef59692

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/functional/wallet_abandonconflict.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ def run_test(self):
120120
assert_equal(newbalance, balance + Decimal("30"))
121121
balance = newbalance
122122

123+
self.log.info("Check abandoned transactions in listsinceblock")
124+
listsinceblock = self.nodes[0].listsinceblock()
125+
txAB1_listsinceblock = [d for d in listsinceblock['transactions'] if d['txid'] == txAB1 and d['category'] == 'send']
126+
for tx in txAB1_listsinceblock:
127+
assert_equal(tx['abandoned'], True)
128+
assert_equal(tx['confirmations'], 0)
129+
assert_equal(tx['trusted'], False)
130+
123131
# Verify that even with a low min relay fee, the tx is not reaccepted from wallet on startup once abandoned
124132
self.restart_node(0, extra_args=["-minrelaytxfee=0.00001"])
125133
assert self.nodes[0].getmempoolinfo()['loaded']

0 commit comments

Comments
 (0)