mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-09 20:23:35 +01:00
05300c1439Use SelectionResult in SelectCoins (Andrew Chow)9d9b101d20Use SelectionResult in AttemptSelection (Andrew Chow)bb50850a44Use SelectionResult for waste calculation (Andrew Chow)e8f7ae5eb3Make an OutputGroup for preset inputs (Andrew Chow)51a9c00b4dReturn SelectionResult from SelectCoinsSRD (Andrew Chow)0ef6184575Return SelectionResult from KnapsackSolver (Andrew Chow)60d2ca72e3Return SelectionResult from SelectCoinsBnB (Andrew Chow)a339add471Make member variables of SelectionResult private (Andrew Chow)cbf0b9f4ffscripted-diff: Use SelectionResult in coin selector tests (Andrew Chow)9d1d86da04Introduce SelectionResult struct (Andrew Chow)94d851d28cFix 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 ACK05300c1439Tree-SHA512: e4dbb4d78a6cda9c237d230b19e7265591efac5a101a64e6970f0654e2c4f93d13bb5d07b98e8c7b8d37321753dbfc94c28c3a7810cb1c59b5bc29b08a8493ef