You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now we pass in a change policy when creating the metric type:
#[derive(Clone,Copy)]pubstructLowestFee{/// The target parameters for the resultant selection.pubtarget:Target,/// The estimated feerate needed to spend our change output later.publong_term_feerate:FeeRate,/// Policy to determine the change output (if any) of a given selection.pubchange_policy:ChangePolicy,}
But what if we pass in a really wacky change_policy that doesn't try and lower your fees? This means a whole lot of complicated logic is needed within the bound function of the metric to try and still get the correct bound with a ChangePolicy that is working against the metric!
This would allow us to remove this entire if/else statement:
Right now we pass in a change policy when creating the metric type:
But what if we pass in a really wacky
change_policy
that doesn't try and lower your fees? This means a whole lot of complicated logic is needed within the bound function of the metric to try and still get the correct bound with aChangePolicy
that is working against the metric!This would allow us to remove this entire if/else statement:
coin-select/src/metrics/lowest_fee.rs
Lines 56 to 108 in 0f7cc31
Can anyone think of a reason you'd want a change policy that is not inline with the metric you are trying to optimize for?
The text was updated successfully, but these errors were encountered: