aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2021-05-06 13:54:22 -0400
committerAndrew Chow <achow101-github@achow101.com>2021-05-19 14:25:06 -0400
commit01dc8ebda50a382d45d3d169b2c3f3965869dcae (patch)
tree1a39944833be7f010cd400536e1984b7be5e970f /src/wallet/test
parentbf26e018de33216d6f0ed0d6ff822b93536f7cc1 (diff)
downloadbitcoin-01dc8ebda50a382d45d3d169b2c3f3965869dcae.tar.xz
Have KnapsackSolver actually use effective values
Although the CreateTransaction loop currently remains, it should be largely unused. KnapsackSolver will now account for transaction fees when doing its selection. In the previous commit, SelectCoinsMinConf was refactored to have some calculations become shared for KnapsackSolver and SelectCoinsBnB. In this commit, KnapsackSolver will now use the not_input_fees and effective_feerate so that it include the fee for non-input things (excluding a change output) so that the algorithm will select enough to cover those fees. This is necessary for selecting on effective values. Additionally, the OutputGroups created for KnapsackSolver will actually have their effective values calculated and set, and KnapsackSolver will do its selection on those effective values. Lastly, SelectCoins is modified to use the same value for preselected inputs for BnB and KnapsackSolver. While it will still use the real value when subtracting the fee from outputs, this behavior will be the same regardless of the algo used for selecting additional inputs.
Diffstat (limited to 'src/wallet/test')
0 files changed, 0 insertions, 0 deletions