elements/src/wallet/test
Samuel Dobson 6b254814c0
Merge bitcoin/bitcoin#17331: Use effective values throughout coin selection
51a3ac242c Have OutputGroup determine the value to use (Andrew Chow)
6d6d278475 Change SelectCoins_test to actually test SelectCoins (Andrew Chow)
9d3bd74ab4 Remove CreateTransaction while loop and some related variables (Andrew Chow)
6f0d5189af Remove use_bnb and bnb_used (Andrew Chow)
de26eb0e1f Do both BnB and Knapsack coin selection in SelectCoinsMinConf (Andrew Chow)
01dc8ebda5 Have KnapsackSolver actually use effective values (Andrew Chow)
bf26e018de Roll static tx fees into nValueToSelect instead of having it be separate (Andrew Chow)
cc3f14b27c Move output reductions for fee to after coin selection (Andrew Chow)
d97d25d950 Make cost_of_change part of CoinSelectionParams (Andrew Chow)
af5867c896 Move some calculations to common code in SelectCoinsMinConf (Andrew Chow)
1bf4a62cb6 scripted-diff: rename some variables (Andrew Chow)

Pull request description:

  Changes `KnapsackSolver` to use effective values instead of just the nominal txout value. Since fees are taken into account during the selection itself, we finally get rid of the `CreateTransaction` loop as well as a few other things that only were only necessary because of that loop.

  This should not change coin selection behavior at all (except maybe remove weird edge cases that were caused by the loop). In order to keep behavior the same, `KnapsackSolver` will select outputs with a negative effective value (as it did before).

ACKs for top commit:
  ryanofsky:
    Code review ACK 51a3ac242c. Looks good to go!
  instagibbs:
    review ACK https://github.com/bitcoin/bitcoin/pull/17331/commits/51a3ac242c92e69b59df26f8f9e287b31e5c3b0f
  meshcollider:
    re-light-utACK 51a3ac242c

Tree-SHA512: 372c27e00edcd5dbf85177421ba88f20bfdaf1791b6e3dc022c44876ecc379403e2375ed69e71c512c49e6af87641001ff385c4b25ab93684b3a08a53bf3824e
2021-05-26 01:35:43 +12:00
..
coinselector_tests.cpp Merge bitcoin/bitcoin#17331: Use effective values throughout coin selection 2021-05-26 01:35:43 +12:00
db_tests.cpp scripted-diff: Replace GetDataDir() calls with gArgs.GetDataDirNet() calls 2021-05-24 10:29:58 +02:00
init_test_fixture.cpp scripted-diff: Replace GetDataDir() calls with gArgs.GetDataDirNet() calls 2021-05-24 10:29:58 +02:00
init_test_fixture.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
init_tests.cpp Change BOOST_CHECK to BOOST_CHECK_EQUAL to see mismatched values when a check fails. 2021-02-09 15:00:02 +01:00
ismine_tests.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
psbt_wallet_tests.cpp psbt: always put a non_witness_utxo and don't remove it 2020-06-24 16:32:19 -04:00
scriptpubkeyman_tests.cpp test: Remove no longer needed MakeChain calls 2020-12-07 20:46:03 -05:00
wallet_crypto_tests.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
wallet_test_fixture.cpp refactor: move first run detection to client code 2021-05-19 08:50:16 +02:00
wallet_test_fixture.h test: Remove no longer needed MakeChain calls 2020-12-07 20:46:03 -05:00
wallet_tests.cpp scripted-diff: Replace GetDataDir() calls with gArgs.GetDataDirNet() calls 2021-05-24 10:29:58 +02:00
walletdb_tests.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00