@@ -112,7 +112,7 @@ impl<'a> CoinSelector<'a> {
112112 }
113113
114114 /// Whether the candidates can cover this `target`'s **value** (net of input fees) — i.e. whether
115- /// enough value is reachable for [`is_target_met `] to hold. Respects [`ban`]ned candidates.
115+ /// enough value is reachable for [`is_funded `] to hold. Respects [`ban`]ned candidates.
116116 ///
117117 /// Selecting *all* effective inputs maximizes the value available, so if that can't meet the
118118 /// target value, nothing can. Monotone, hence exact.
@@ -122,12 +122,12 @@ impl<'a> CoinSelector<'a> {
122122 /// which enforce the cap) to actually build a selection.
123123 ///
124124 /// [`ban`]: Self::ban
125- /// [`is_target_met `]: Self::is_target_met
125+ /// [`is_funded `]: Self::is_funded
126126 /// [`select_until_target_met`]: Self::select_until_target_met
127- pub fn is_selection_possible ( & self , target : Target ) -> bool {
127+ pub fn is_fundable ( & self , target : Target ) -> bool {
128128 let mut test = self . clone ( ) ;
129129 test. select_all_effective ( target. fee . rate ) ;
130- test. is_target_met ( target)
130+ test. is_funded ( target)
131131 }
132132
133133 /// Returns true if no candidates have been selected.
@@ -439,7 +439,7 @@ impl<'a> CoinSelector<'a> {
439439 ///
440440 /// Always `true` when `max_weight` is `None`. Note this is the *anti-monotone* half of
441441 /// feasibility (adding inputs adds weight), so it is kept separate from the monotone
442- /// value-only [`is_target_met `](Self::is_target_met ).
442+ /// value-only [`is_funded `](Self::is_funded ).
443443 pub fn is_within_max_weight ( & self , target : Target , drain : Drain ) -> bool {
444444 match target. max_weight {
445445 Some ( max_weight) => self . weight ( target. outputs , drain. weights ) <= max_weight,
@@ -452,21 +452,21 @@ impl<'a> CoinSelector<'a> {
452452 ///
453453 /// This is **monotone**: selecting more never un-meets it. It deliberately does *not* include
454454 /// the weight cap — see [`is_within_max_weight`](Self::is_within_max_weight).
455- pub fn is_target_met_with_drain ( & self , target : Target , drain : Drain ) -> bool {
455+ pub fn is_funded_with_drain ( & self , target : Target , drain : Drain ) -> bool {
456456 self . excess ( target, drain) >= 0
457457 }
458458
459459 /// Whether the selection covers the target **value** (net of input fees), i.e. [`excess`] is
460460 /// non-negative. **Monotone** (selecting more never un-meets it), and it deliberately does
461461 /// *not* check [`Target::max_weight`] — that is the separate, anti-monotone
462- /// [`is_within_max_weight`]. See [`is_target_met_with_drain `] for the version that
462+ /// [`is_within_max_weight`]. See [`is_funded_with_drain `] for the version that
463463 /// accounts for a specific `drain`.
464464 ///
465465 /// [`excess`]: Self::excess
466466 /// [`is_within_max_weight`]: Self::is_within_max_weight
467- /// [`is_target_met_with_drain `]: Self::is_target_met_with_drain
468- pub fn is_target_met ( & self , target : Target ) -> bool {
469- self . is_target_met_with_drain ( target, Drain :: NONE )
467+ /// [`is_funded_with_drain `]: Self::is_funded_with_drain
468+ pub fn is_funded ( & self , target : Target ) -> bool {
469+ self . is_funded_with_drain ( target, Drain :: NONE )
470470 }
471471
472472 /// Select all unselected candidates
@@ -492,8 +492,8 @@ impl<'a> CoinSelector<'a> {
492492 ) ;
493493 if excess > change_policy. min_value as i64 {
494494 debug_assert_eq ! (
495- self . is_target_met ( target) ,
496- self . is_target_met_with_drain (
495+ self . is_funded ( target) ,
496+ self . is_funded_with_drain (
497497 target,
498498 Drain {
499499 weights: change_policy. drain_weights,
@@ -512,12 +512,12 @@ impl<'a> CoinSelector<'a> {
512512 /// `change_policy`. If it should not, then it will return [`Drain::NONE`]. The value of the
513513 /// `Drain` will be the same as [`drain_value`].
514514 ///
515- /// If [`is_target_met `] returns true for this selection then [`is_target_met_with_drain `] will
515+ /// If [`is_funded `] returns true for this selection then [`is_funded_with_drain `] will
516516 /// also be true if you pass in the drain returned from this method.
517517 ///
518518 /// [`drain_value`]: Self::drain_value
519- /// [`is_target_met_with_drain `]: Self::is_target_met_with_drain
520- /// [`is_target_met `]: Self::is_target_met
519+ /// [`is_funded_with_drain `]: Self::is_funded_with_drain
520+ /// [`is_funded `]: Self::is_funded
521521 #[ must_use]
522522 pub fn drain ( & self , target : Target , change_policy : ChangePolicy ) -> Drain {
523523 match self . drain_value ( target, change_policy) {
@@ -554,7 +554,7 @@ impl<'a> CoinSelector<'a> {
554554 /// [`Target::max_weight`]. Note this only reflects *this* in-order greedy selection; a
555555 /// different selection might still fit the cap (use branch and bound to search for one).
556556 pub fn select_until_target_met ( & mut self , target : Target ) -> Result < ( ) , SelectError > {
557- self . select_until ( |cs| cs. is_target_met ( target) )
557+ self . select_until ( |cs| cs. is_funded ( target) )
558558 . ok_or_else ( || {
559559 SelectError :: InsufficientFunds ( InsufficientFunds {
560560 missing : self . excess ( target, Drain :: NONE ) . unsigned_abs ( ) ,
0 commit comments