aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_abandonconflict.py
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-10-18 11:41:10 +0800
committerfanquake <fanquake@gmail.com>2021-10-18 12:02:55 +0800
commitef596923a86e7069a185942e0507025442b01d1b (patch)
tree8b746e5dd9cf0df9542e130293503dcf4dfc19d9 /test/functional/wallet_abandonconflict.py
parent3bf40d06a22ee1c547d2924d109b8e185ddbf5ef (diff)
parentbda620aecd690004c52e550ad7de187ce0eb655d (diff)
downloadbitcoin-ef596923a86e7069a185942e0507025442b01d1b.tar.xz
Merge bitcoin/bitcoin#23080: test: check abandoned tx in listsinceblock
bda620aecd690004c52e550ad7de187ce0eb655d 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 bda620aecd690004c52e550ad7de187ce0eb655d theStack: ACK bda620aecd690004c52e550ad7de187ce0eb655d 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
Diffstat (limited to 'test/functional/wallet_abandonconflict.py')
-rwxr-xr-xtest/functional/wallet_abandonconflict.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/wallet_abandonconflict.py b/test/functional/wallet_abandonconflict.py
index 70ca5a2fe4..d6766097f6 100755
--- a/test/functional/wallet_abandonconflict.py
+++ b/test/functional/wallet_abandonconflict.py
@@ -120,6 +120,14 @@ class AbandonConflictTest(BitcoinTestFramework):
assert_equal(newbalance, balance + Decimal("30"))
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
self.restart_node(0, extra_args=["-minrelaytxfee=0.00001"])
assert self.nodes[0].getmempoolinfo()['loaded']