test: Target exact weight in MiniWallet _bulk_tx #25773

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2208-test-exact-bulk-weight-🏞 changing 2 files +10 −7
  1. MarcoFalke commented at 10:05 AM on August 3, 2022: member

    Seems better to target the exact weight than a weight that is up to more than 2000 WU larger.

    Also, replace a broad -acceptnonstdtxn=1 with -datacarriersize=100000 to document the test assumptions better.

  2. test: Target exact weight in MiniWallet _bulk_tx
    Also, replace broad -acceptnonstdtxn=1 with -datacarriersize=100000
    fa2537cf0a
  3. fanquake added the label Tests on Aug 3, 2022
  4. glozow requested review from theStack on Aug 4, 2022
  5. theStack approved
  6. theStack commented at 1:24 PM on August 4, 2022: contributor

    Code-review ACK fa2537cf0a7629d81df1bc5b4ae6a22dc572647b

    TIL that the Python repetition operator * also accepts negative values and simple yields empty (byte-)strings in that case:

    >>> b'a' * -1337
    b''
    

    (Intuitively, I would have preferred to keep the first assertion, checking that the target weight is larger than the current tx's weight, in order to prevent a negative dummy_vbytes value, but it doesn't seem to have any negative consequences (no pun intended)🤷‍♂️ ).

  7. MarcoFalke merged this on Aug 4, 2022
  8. MarcoFalke closed this on Aug 4, 2022

  9. MarcoFalke deleted the branch on Aug 4, 2022
  10. sidhujag referenced this in commit dea25f0755 on Aug 4, 2022
  11. bitcoin locked this on Aug 4, 2023
Contributors
Labels

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-17 06:13 UTC

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