aboutsummaryrefslogtreecommitdiff
path: root/contrib/devtools
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2022-08-05 12:51:44 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2022-10-26 15:54:31 -0300
commit5baedc33519661af9d19efcefd23dca8998d2547 (patch)
tree3a52f7a25e97f9bd937a6a8a87c5b027f9f02d6a /contrib/devtools
parent295852f61998a025b0b28a0671e6e1cf0dc08d0d (diff)
downloadbitcoin-5baedc33519661af9d19efcefd23dca8998d2547.tar.xz
wallet: remove fetch pre-selected-inputs responsibility from SelectCoins
so if there is an error in any of the pre-set coins, we can fail right away without computing the wallet available coins set (calling `AvailableCoins`) which is a slow operation as it goes through the entire wallet's txes map. ---------------------- And to make the Coin Selection flow cleared, have decoupled SelectCoins in two functions: 1) AutomaticCoinSelection. 2) SelectCoins. 1) AutomaticCoinSelection: Receives a set of coins and selects the best subset of them to cover the target amount. 2) SelectCoins In charge of select all the user manually selected coins first ("pre-set inputs"), and if coin_control 'm_allow_other_inputs=true', call 'AutomaticCoinSelection' to select a subset of coins owned by the wallet to cover for the target - preset_inputs.total_amount remaining value.
Diffstat (limited to 'contrib/devtools')
0 files changed, 0 insertions, 0 deletions