aboutsummaryrefslogtreecommitdiff
path: root/src/policy
diff options
context:
space:
mode:
authorMurch <murch@murch.one>2024-01-08 13:04:29 -0500
committerMurch <murch@murch.one>2024-02-09 11:03:18 +0100
commit13161ecf032b7a850686e5942c12222c8f3d0d52 (patch)
tree9cb96bfd4ff94772613f74ae18ff5ce89cb72d43 /src/policy
parentb7672c7cdd87acb105639f475744094b53cc9891 (diff)
downloadbitcoin-13161ecf032b7a850686e5942c12222c8f3d0d52.tar.xz
opt: Skip over barren combinations of tiny UTXOs
Given a lot of small amount UTXOs it is possible that the lookahead indicates sufficient funds, but any combination of them would push us beyond the current best_weight. We can estimate a lower bound for the minimal necessary weight to reach target from the maximal amount and minimal weight in the tail of the UTXO pool: if adding a number of hypothetical UTXOs of this maximum amount and minimum weight would not be able to beat `best_weight`, we can SHIFT to the omission branch, and CUT if the last selected UTXO is not heavier than the minimum weight of the remainder.
Diffstat (limited to 'src/policy')
0 files changed, 0 insertions, 0 deletions