0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-09 15:37:00 -04:00
bitcoin-core/src/wallet/test
W. J. van der Laan c840ab0231
Merge bitcoin/bitcoin#22019: wallet: Introduce SelectionResult for encapsulating a coin selection solution
05300c1439 Use SelectionResult in SelectCoins (Andrew Chow)
9d9b101d20 Use SelectionResult in AttemptSelection (Andrew Chow)
bb50850a44 Use SelectionResult for waste calculation (Andrew Chow)
e8f7ae5eb3 Make an OutputGroup for preset inputs (Andrew Chow)
51a9c00b4d Return SelectionResult from SelectCoinsSRD (Andrew Chow)
0ef6184575 Return SelectionResult from KnapsackSolver (Andrew Chow)
60d2ca72e3 Return SelectionResult from SelectCoinsBnB (Andrew Chow)
a339add471 Make member variables of SelectionResult private (Andrew Chow)
cbf0b9f4ff scripted-diff: Use SelectionResult in coin selector tests (Andrew Chow)
9d1d86da04 Introduce SelectionResult struct (Andrew Chow)
94d851d28c Fix bnb_search_test to use set equivalence for (Andrew Chow)

Pull request description:

  Instead of returning a set of selected coins and their total value as separate items, encapsulate both of these, and other variables, into a new `SelectionResult` struct. This allows us to have all of the things relevant to a coin selection solution be in a single object. `SelectionResult` enables us to implement the waste calculation in a cleaner way.

  All of the coin selection functions (`SelectCoinsBnB`, `KnapsackSolver`, `AttemptSelection`, and `SelectCoins`) are changed to use a `SelectionResult` as the output parameter.

  Based on #22009

ACKs for top commit:
  laanwj:
    Code review ACK 05300c1439

Tree-SHA512: e4dbb4d78a6cda9c237d230b19e7265591efac5a101a64e6970f0654e2c4f93d13bb5d07b98e8c7b8d37321753dbfc94c28c3a7810cb1c59b5bc29b08a8493ef
2021-12-09 17:21:46 +01:00
..
fuzz Create a tr() descriptor bech32m DescriptorScriptPubKeyMan by default 2021-11-16 12:20:13 -05:00
coinselector_tests.cpp Merge bitcoin/bitcoin#22019: wallet: Introduce SelectionResult for encapsulating a coin selection solution 2021-12-09 17:21:46 +01:00
db_tests.cpp refactor: Block unsafe fs::path std::string conversion calls 2021-10-05 11:10:47 -04:00
init_test_fixture.cpp refactor: Block unsafe fs::path std::string conversion calls 2021-10-05 11:10:47 -04:00
init_test_fixture.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
init_tests.cpp refactor: Block unsafe fs::path std::string conversion calls 2021-10-05 11:10:47 -04:00
ismine_tests.cpp Remove gArgs from wallet.h and wallet.cpp 2021-11-09 11:27:06 +01:00
psbt_wallet_tests.cpp refactor: Make CWalletTx sync state type-safe 2021-11-15 09:11:44 -05:00
scriptpubkeyman_tests.cpp Remove gArgs from wallet.h and wallet.cpp 2021-11-09 11:27:06 +01:00
spend_tests.cpp Remove gArgs from wallet.h and wallet.cpp 2021-11-09 11:27:06 +01:00
util.cpp Remove gArgs from wallet.h and wallet.cpp 2021-11-09 11:27:06 +01:00
util.h Remove gArgs from wallet.h and wallet.cpp 2021-11-09 11:27:06 +01:00
wallet_crypto_tests.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
wallet_test_fixture.cpp Remove gArgs from wallet.h and wallet.cpp 2021-11-09 11:27:06 +01:00
wallet_test_fixture.h test: Fix segfault in the psbt_wallet_tests/psbt_updater_test 2021-10-31 13:48:00 +02:00
wallet_tests.cpp Remove unused (and broken) functionality in SpanReader 2021-12-06 16:18:14 -05:00
wallet_transaction_tests.cpp refactor: Make CWalletTx sync state type-safe 2021-11-15 09:11:44 -05:00
walletdb_tests.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00