Merge bitcoin/bitcoin#23267: test: bip125-replaceable in listsinceblock

b7884dd1b6 test: bip125-replaceable in listsinceblock (brunoerg)

Pull request description:

  This PR adds test coverage for bip125-replaceable in listsinceblock. I added this test into wallet_listtransactions.py instead of putting it into wallet_listsinceblock.py to utilize the scenario already created in wallet_listtransactions.py and avoid repetition.

ACKs for top commit:
  theStack:
    ACK b7884dd1b6
  promag:
    ACK b7884dd1b6.
  stratospher:
    tested ACK b7884dd. Verified the bip125-replaceable status of some transactions with listsinceblock.
  lsilva01:
    tACK b7884dd  on Ubuntu 20.04

Tree-SHA512: 510dfe5a6f9d68e5a656514d356dc8fe99324296ed8caa78f0eb4b6c6906cf70b1fb50bde80aa6f61d726b2fa1d4ce1fe48c635ce24285588e56ceff92291617
This commit is contained in:
MarcoFalke 2021-10-21 10:21:24 +02:00
commit 88fc7950f8
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

View File

@ -204,6 +204,15 @@ class ListTransactionsTest(BitcoinTestFramework):
assert_equal(n.gettransaction(txid_3b)["bip125-replaceable"], "yes")
assert_equal(n.gettransaction(txid_4)["bip125-replaceable"], "unknown")
self.log.info("Test bip125-replaceable status with listsinceblock")
for n in self.nodes[0:2]:
txs = {tx['txid']: tx['bip125-replaceable'] for tx in n.listsinceblock()['transactions']}
assert_equal(txs[txid_1], "no")
assert_equal(txs[txid_2], "no")
assert_equal(txs[txid_3], "yes")
assert_equal(txs[txid_3b], "yes")
assert_equal(txs[txid_4], "unknown")
self.log.info("Test mined transactions are no longer bip125-replaceable")
self.generate(self.nodes[0], 1)
assert txid_3b not in self.nodes[0].getrawmempool()