test: bip125-replaceable in listsinceblock #23267

pull brunoerg wants to merge 1 commits into bitcoin:master from brunoerg:2021-10-test-bip125-listsinceblock changing 1 files +9 −0
  1. brunoerg commented at 2:25 PM on October 12, 2021: member

    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.

  2. fanquake added the label Tests on Oct 12, 2021
  3. in test/functional/wallet_listtransactions.py:220 in 5686dc55db outdated
     215 | +                elif tx['txid'] == txid_3:
     216 | +                    assert_equal(tx['bip125-replaceable'], "yes")
     217 | +                elif tx['txid'] == txid_3b:
     218 | +                    assert_equal(tx['bip125-replaceable'], "yes")
     219 | +                elif tx['txid'] == txid_4:
     220 | +                    assert_equal(tx['bip125-replaceable'], "unknown")
    


    MarcoFalke commented at 2:56 PM on October 12, 2021:
                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")
    

    MarcoFalke commented at 2:56 PM on October 12, 2021:

    nit: wondering if this can be simplified


    brunoerg commented at 2:59 PM on October 12, 2021:

    Great, thanks!

  4. test: bip125-replaceable in listsinceblock b7884dd1b6
  5. brunoerg force-pushed on Oct 12, 2021
  6. theStack approved
  7. theStack commented at 1:42 PM on October 14, 2021: member

    ACK b7884dd1b68814c59ff4fb5f7a199e306b015e85

  8. promag commented at 9:31 PM on October 15, 2021: member

    ACK b7884dd1b68814c59ff4fb5f7a199e306b015e85.

  9. stratospher commented at 6:27 AM on October 16, 2021: contributor

    tested ACK b7884dd. Verified the bip125-replaceable status of some transactions with listsinceblock.

    <details> <summary>Test results:</summary> <br>

    $ test/functional/wallet_listtransactions.py
    2021-10-16T05:53:33.218000Z TestFramework (INFO): Initializing test directory /var/folders/bh/7x61zw991x15d01dlnx_cgrh0000gn/T/bitcoin_func_test_birab8hp
    2021-10-16T05:53:35.521000Z TestFramework (INFO): Test simple send from node0 to node1
    2021-10-16T05:53:35.826000Z TestFramework (INFO): Test confirmations change after mining a block
    2021-10-16T05:53:35.841000Z TestFramework (INFO): Test send-to-self on node0
    2021-10-16T05:53:36.133000Z TestFramework (INFO): Test sendmany from node1: twice to self, twice to node0
    2021-10-16T05:53:45.867000Z TestFramework (INFO): Test 'include_watchonly' feature (legacy wallet)
    2021-10-16T05:53:47.363000Z TestFramework (INFO): Test txs w/o opt-in RBF (bip125-replaceable=no)
    2021-10-16T05:53:49.817000Z TestFramework (INFO): Test txs with opt-in RBF (bip125-replaceable=yes)
    2021-10-16T05:53:52.112000Z TestFramework (INFO): Test tx with unknown RBF state (bip125-replaceable=unknown)
    2021-10-16T05:53:53.147000Z TestFramework (INFO): Test bip125-replaceable status with gettransaction RPC
    2021-10-16T05:53:53.166000Z TestFramework (INFO): Test bip125-replaceable status with listsinceblock
    2021-10-16T05:53:53.182000Z TestFramework (INFO): Test mined transactions are no longer bip125-replaceable
    2021-10-16T05:53:53.240000Z TestFramework (INFO): Stopping nodes
    2021-10-16T05:53:53.769000Z TestFramework (INFO): Cleaning up /var/folders/bh/7x61zw991x15d01dlnx_cgrh0000gn/T/bitcoin_func_test_birab8hp on exit
    2021-10-16T05:53:53.769000Z TestFramework (INFO): Tests successful
    

    </details>

  10. lsilva01 approved
  11. lsilva01 commented at 4:57 AM on October 18, 2021: contributor

    tACK b7884dd on Ubuntu 20.04

  12. MarcoFalke merged this on Oct 21, 2021
  13. MarcoFalke closed this on Oct 21, 2021

  14. sidhujag referenced this in commit cecb9e52f2 on Oct 21, 2021
  15. DrahtBot locked this on Oct 30, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 03:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me