Wallet hd functional test speedup and clarification #12947

pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:wallet_hd_speedup changing 1 files +9 −7
  1. instagibbs commented at 3:28 PM on April 11, 2018: member

    With keypool=0 I see no reason to do 300 addresses and sends.

    (with --enable-debug)

    Before patch: real 1m10.412s user 0m49.772s sys 0m3.988s

    After: real 0m11.566s user 0m3.344s sys 0m4.648s

    Also added check, since I failed to understand that on startup the wallet already knows about funds by rescanning blocks newer than oldest key birthdate.

  2. fanquake added the label Tests on Apr 11, 2018
  3. practicalswift commented at 3:34 PM on April 11, 2018: contributor

    Concept ACK

  4. speed up wallet_hd.py and clarify/augment checks 6cba60ace2
  5. in test/functional/wallet_hd.py:51 in 4669a3c5d2 outdated
      47 | @@ -48,7 +48,7 @@ def run_test(self):
      48 |          # Also send funds to each add
      49 |          self.nodes[0].generate(101)
      50 |          hd_add = None
      51 | -        num_hd_adds = 300
      52 | +        num_hd_adds = 10
    


    MarcoFalke commented at 3:42 PM on April 11, 2018:

    nit: Since you touch this anyway and reviewers most likely look at the usage of this var anyway, you might as well make it NUM_HD_ADDS, since it is a constant.


    instagibbs commented at 3:50 PM on April 11, 2018:

    done. Also touched the second loop, replacing _ with i since it's actually being used.

  6. instagibbs force-pushed on Apr 11, 2018
  7. MarcoFalke commented at 4:21 PM on April 11, 2018: member

    utACK 6cba60ace247af8e2341e8540a0a0dc947b5a187 (Dind't check for speedup)

  8. jnewbery commented at 8:47 PM on April 11, 2018: member

    ACK https://github.com/bitcoin/bitcoin/commit/6cba60ace247af8e2341e8540a0a0dc947b5a187

    Reduces test runtime from 15s to 5s for me (almost all in stop-starting nodes I assume). @MarcoFalke wrote this test - if he sees no reason for NUM_HD_ADDS to be 300, then I guess this is safe for merge!

  9. MarcoFalke merged this on Apr 11, 2018
  10. MarcoFalke closed this on Apr 11, 2018

  11. MarcoFalke referenced this in commit 979f59850c on Apr 11, 2018
  12. jtimon commented at 10:59 AM on May 14, 2018: contributor

    utACK 979f59850c72624137d25f80be4188c3ba6b5fa0

  13. jasonbcox referenced this in commit b4306092e4 on Aug 12, 2019
  14. PastaPastaPasta referenced this in commit 2161985a63 on Nov 9, 2020
  15. MarcoFalke locked this on Sep 8, 2021

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-27 03:15 UTC

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