File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -833,16 +833,15 @@ impl Satisfaction {
833833 // signatures
834834 let mut sat_indices = ( 0 ..subs. len ( ) ) . collect :: < Vec < _ > > ( ) ;
835835 sat_indices. sort_by_key ( |& i| {
836- let stack_weight = match ( & sats[ i] . stack , & ret_stack[ i] . stack ) {
836+ // For malleable satifactions, directly choose smallest weights
837+ match ( & sats[ i] . stack , & ret_stack[ i] . stack ) {
837838 ( & Witness :: Unavailable , _) | ( & Witness :: Impossible , _) => i64:: MAX ,
838839 // This is only possible when one of the branches has PkH
839840 ( _, & Witness :: Unavailable ) | ( _, & Witness :: Impossible ) => i64:: MIN ,
840841 ( & Witness :: Stack ( ref s) , & Witness :: Stack ( ref d) ) => {
841842 witness_size ( s) as i64 - witness_size ( d) as i64
842843 }
843- } ;
844- // For malleable satifactions, directly choose smallest weights
845- stack_weight
844+ }
846845 } ) ;
847846
848847 // swap the satisfactions
You can’t perform that action at this time.
0 commit comments