bench: Simplify CoinSelection #13563

pull promag wants to merge 1 commits into bitcoin:master from promag:2018-08-bench-coinselection changing 1 files +10 −16
  1. promag commented at 10:51 AM on June 28, 2018: member

    Closes #13549.

    As pointed by @MarcoFalke:

    • SelectCoinsMinConf should always succeed as there are enough coins in the wallet.
    • Removed creating the coins in the wallet.
  2. in src/bench/coin_selection.cpp:51 in 3282c66180 outdated
      55 |          bool bnb_used;
      56 |          CoinEligibilityFilter filter_standard(1, 6, 0);
      57 | -        CoinSelectionParams coin_selection_params(false, 34, 148, CFeeRate(0), 0);
      58 | -        bool success = wallet.SelectCoinsMinConf(1003 * COIN, filter_standard, vCoins, setCoinsRet, nValueRet, coin_selection_params, bnb_used)
      59 | -                       || wallet.SelectCoinsMinConf(1003 * COIN, filter_standard, vCoins, setCoinsRet, nValueRet, coin_selection_params, bnb_used);
      60 | +        CoinSelectionParams coin_selection_params(true, 34, 148, CFeeRate(0), 0);
    


    MarcoFalke commented at 11:55 AM on June 28, 2018:

    can be const and moved out of the loop. (Same true for all lines above this one)

  3. MarcoFalke commented at 11:56 AM on June 28, 2018: member

    utACK 3282c66180f904157e3fed6905f7c04be93a5a55

  4. bench: Simplify CoinSelection c2e4fc84ec
  5. promag force-pushed on Jun 28, 2018
  6. promag commented at 1:29 PM on June 28, 2018: member

    @MarcoFalke force pushed with your suggestion.

  7. fanquake added the label Tests on Jun 28, 2018
  8. MarcoFalke commented at 5:52 PM on June 28, 2018: member

    utACK c2e4fc84ecff72c36f6adc1292ba8242fc3cbaee

  9. achow101 commented at 6:37 PM on June 28, 2018: member

    utACK c2e4fc84ecff72c36f6adc1292ba8242fc3cbaee

  10. MarcoFalke merged this on Jun 28, 2018
  11. MarcoFalke closed this on Jun 28, 2018

  12. MarcoFalke referenced this in commit b330f3fdd5 on Jun 28, 2018
  13. promag deleted the branch on Jun 28, 2018
  14. jamesob commented at 3:57 PM on July 2, 2018: member
  15. MarcoFalke commented at 4:41 PM on July 2, 2018: member

    Seems there is also a difference between gcc and clang:

    coinselection

  16. UdjinM6 referenced this in commit d46ef93f4b on Jun 20, 2021
  17. UdjinM6 referenced this in commit 08345e5120 on Jun 24, 2021
  18. UdjinM6 referenced this in commit e1bb644601 on Jun 26, 2021
  19. UdjinM6 referenced this in commit d4a6c09f5c on Jun 26, 2021
  20. UdjinM6 referenced this in commit aa2fbaf398 on Jun 26, 2021
  21. UdjinM6 referenced this in commit 68e4e5b5fa on Jun 28, 2021
  22. 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-16 18:15 UTC

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