diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2022-08-05 12:51:44 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2022-10-26 15:54:31 -0300 |
commit | 5baedc33519661af9d19efcefd23dca8998d2547 (patch) | |
tree | 3a52f7a25e97f9bd937a6a8a87c5b027f9f02d6a /src/policy | |
parent | 295852f61998a025b0b28a0671e6e1cf0dc08d0d (diff) |
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 'src/policy')
0 files changed, 0 insertions, 0 deletions