Commit 2daf497 1 parent b013874 commit 2daf497 Copy full SHA for 2daf497
File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -523,7 +523,7 @@ impl WantsInputs {
523
523
& self ,
524
524
candidate_inputs : impl IntoIterator < Item = InputPair > ,
525
525
) -> Result < InputPair , SelectionError > {
526
- let min_original_out_sats = self
526
+ let min_out_sats = self
527
527
. payjoin_psbt
528
528
. unsigned_tx
529
529
. output
@@ -532,7 +532,7 @@ impl WantsInputs {
532
532
. min ( )
533
533
. unwrap_or ( Amount :: MAX_MONEY ) ;
534
534
535
- let min_original_in_sats = self
535
+ let min_in_sats = self
536
536
. payjoin_psbt
537
537
. input_pairs ( )
538
538
. filter_map ( |input| input. previous_txout ( ) . ok ( ) . map ( |txo| txo. value ) )
@@ -543,8 +543,8 @@ impl WantsInputs {
543
543
544
544
for input_pair in candidate_inputs {
545
545
let candidate_sats = input_pair. previous_txout ( ) . value ;
546
- let candidate_min_out = min ( min_original_out_sats , prior_payment_sats + candidate_sats) ;
547
- let candidate_min_in = min ( min_original_in_sats , candidate_sats) ;
546
+ let candidate_min_out = min ( min_out_sats , prior_payment_sats + candidate_sats) ;
547
+ let candidate_min_in = min ( min_in_sats , candidate_sats) ;
548
548
549
549
if candidate_min_in > candidate_min_out {
550
550
// The candidate avoids UIH2 but conforms to UIH1: Optimal change heuristic.
You can’t perform that action at this time.
0 commit comments