test: feature_blockfilterindex_prune.py improvements #21297

pull jonatack wants to merge 2 commits into bitcoin:master from jonatack:feature_blockfilterindex_prune-improvements changing 1 files +30 −21
  1. jonatack commented at 10:28 PM on February 24, 2021: member
    • improves the assertions
    • removes an unneeded node, reducing from two to one, and some unneeded extra_arg code
  2. fanquake added the label Tests on Feb 24, 2021
  3. in test/functional/feature_blockfilterindex_prune.py:21 in 764ac927d1 outdated
      17 | @@ -18,32 +18,41 @@ def set_test_params(self):
      18 |      def run_test(self):
      19 |          # test basic pruning compatibility & filter access of pruned blocks
      20 |          self.log.info("check if we can access a blockfilter when pruning is enabled but no blocks are actually pruned")
      21 | -        assert len(self.nodes[1].getblockfilter(self.nodes[1].getbestblockhash())['filter']) > 0
      22 | +        self.sync_all()
    


    MarcoFalke commented at 7:01 AM on February 25, 2021:

    sync_all syncs the mempool and blocks, but not the blockfilter. You'll need self.wait_until(lambda: self.nodes[1].getindexinfo() == {'basic block filter index': {'synced': True, 'best_block_height': 200}}). Either in this line or by modifying sync_all.


    jonatack commented at 10:19 AM on February 25, 2021:

    Thanks! I hadn't seen #21252 that fixes the issue.

  4. DrahtBot commented at 8:36 AM on February 25, 2021: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  5. jonatack closed this on Feb 25, 2021

  6. MarcoFalke commented at 1:33 PM on February 25, 2021: member

    Happy to ACK after a rebase, if still relevant

  7. test: improve assertions in feature_blockfilterindex_prune.py ace3f4cbdf
  8. jonatack reopened this on Feb 25, 2021

  9. jonatack force-pushed on Feb 25, 2021
  10. jonatack marked this as ready for review on Feb 25, 2021
  11. jonatack commented at 2:23 PM on February 25, 2021: member

    Thanks -- rebased, updated, and now removes an unneeded node to use one instead of two.

  12. jonatack renamed this:
    test: `feature_blockfilterindex_prune.py` improvements
    test: feature_blockfilterindex_prune.py improvements
    on Feb 25, 2021
  13. in test/functional/feature_blockfilterindex_prune.py:46 in 3c3e0617cb outdated
      53 | +
      54 |          self.log.info("start node without blockfilterindex")
      55 | -        self.stop_node(1)
      56 | -        self.start_node(1, extra_args=self.extra_args[0])
      57 | +        self.stop_node(0)
      58 | +        self.start_node(0, extra_args=["-fastprune", "-prune=1"])
    


    MarcoFalke commented at 4:11 PM on February 25, 2021:
            self.restart_node(0, extra_args=["-fastprune", "-prune=1"])
    

    might be possible to write shorter


    jonatack commented at 5:08 PM on February 25, 2021:

    nice! done

  14. MarcoFalke approved
  15. MarcoFalke commented at 4:14 PM on February 25, 2021: member

    I presume the first node was used as "network node" to serve the blockchain, though nothing is done with the chain, so seems fine to remove it

  16. test: remove unneeded node from feature_blockfilterindex_prune.py 88c4b9b761
  17. jonatack force-pushed on Feb 25, 2021
  18. MarcoFalke commented at 5:09 PM on February 25, 2021: member

    ACK 88c4b9b761964d0b3011126796f272cfca2a9fa2

  19. jonatack commented at 5:09 PM on February 25, 2021: member

    Updated per feedback to git diff 3c3e061 88c4b9b (thanks!)

  20. brunoerg approved
  21. brunoerg commented at 11:57 AM on February 27, 2021: member

    Tested ACK 88c4b9b761964d0b3011126796f272cfca2a9fa2

    • Run it on MacOS 11.1
    • Code looks great for me
  22. MarcoFalke merged this on Feb 27, 2021
  23. MarcoFalke closed this on Feb 27, 2021

  24. jonatack deleted the branch on Feb 27, 2021
  25. sidhujag referenced this in commit 8c51d2738d on Feb 27, 2021
  26. Fabcien referenced this in commit eacbda7591 on Apr 5, 2022
  27. DrahtBot locked this on Aug 16, 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-04-14 21:14 UTC

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