Provide a default CoinSelectionSource implementation via a new trait
authorWilmer Paulino <wilmer@wilmerpaulino.com>
Thu, 27 Apr 2023 00:44:49 +0000 (17:44 -0700)
committerWilmer Paulino <wilmer@wilmerpaulino.com>
Mon, 19 Jun 2023 21:05:46 +0000 (14:05 -0700)
commitbc39da678eccbcb0ad53325fc294837b67eb7f89
treec5ca5b870009e12df19150cb99f7fa7a2dd93d58
parentd4b6f8c08e6eceaa13a531acdb7161b85337f3cc
Provide a default CoinSelectionSource implementation via a new trait

Certain users may not care how their UTXOs are selected, or their wallet
may not expose enough controls to fully implement the
`CoinSelectionSource` trait. As an alternative, we introduce another
trait `WalletSource` they could opt to implement instead, which is much
simpler as it just returns the set of confirmed UTXOs that may be used.
This trait implementation is then consumed into a wrapper `Wallet` which
implements the `CoinSelectionSource` trait using a "smallest
above-dust-after-spend first" coin selection algorithm.
lightning/src/events/bump_transaction.rs