[wallet] Cleanup tests #7193

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:MarcoFalke-2015-WalletTests changing 1 files +10 −8
  1. MarcoFalke commented at 1:03 PM on December 9, 2015: member

    This is a follow up of #4906.

    Please review commit-by-commit:

    • First commit: The test case is supposed to verify that input pruning works. However, for inputs [100] * 2, [10] * 12 and a target value of 221 the old code as well as the new code always return [100] * 2, [10] * 3, regardless of the number of iterations, etc. To actually test pruning, one needs a sufficient amount of "big coins" so that the random approximation misses at least one big coin even if iterations=1000 (default). Thus, "smaller coins" get added by the algorithm. (But the algorithm does not yet know they are not sufficient and will later be useless, after executing the second pass)
    • <strike>Second commit: Use clang-format because the code style is really messed up here. (Reminder to use ?w=0 flag on GitHub to disable white space diff) // moved to a later pull
  2. [wallet] Adjust pruning test fafd09375e
  3. MarcoFalke commented at 1:27 PM on December 9, 2015: member

    If someone feels like testing that pruning the trimming test must fail on 0.12, git diff 08000~1..fafd093 src/wallet/test/wallet_tests.cpp | git apply onto 0.12 may come in handy.

  4. jonasschnelli commented at 7:44 AM on December 10, 2015: contributor

    Confirmed as move-only expect of the new pruning_in_ApproximateBestSet test (L339-L346). utACK.

  5. jonasschnelli added the label Tests on Dec 10, 2015
  6. MarcoFalke force-pushed on Jan 3, 2016
  7. Xekyo commented at 10:44 PM on January 3, 2016: member

    utACK Those changes make sense to me.

  8. laanwj merged this on Jan 5, 2016
  9. laanwj closed this on Jan 5, 2016

  10. laanwj referenced this in commit 2078495d9c on Jan 5, 2016
  11. MarcoFalke deleted the branch on Jan 5, 2016
  12. laanwj referenced this in commit bfdaa3c87f on Jan 5, 2016
  13. laanwj commented at 11:59 AM on January 5, 2016: member

    Backported to 0.12 as bfdaa3c - 96e8d12 is also in there, so the test doesn't fail on 0.12.

  14. DrahtBot 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-15 15:15 UTC

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