File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -867,18 +867,19 @@ mod tests{
867867
868868 #[ test]
869869 fn test_midstates ( ) {
870- // test that engine creation roundtrips
871- assert_eq ! ( tag_engine( "TapLeaf/elements" ) . midstate( ) , TapLeafTag :: engine( ) . midstate( ) ) ;
872- assert_eq ! ( tag_engine( "TapBranch/elements" ) . midstate( ) , TapBranchTag :: engine( ) . midstate( ) ) ;
873- assert_eq ! ( tag_engine( "TapTweak/elements" ) . midstate( ) , TapTweakTag :: engine( ) . midstate( ) ) ;
874- assert_eq ! ( tag_engine( "TapSighash/elements" ) . midstate( ) , TapSighashTag :: engine( ) . midstate( ) ) ;
875-
876870 // check that hash creation is the same as building into the same engine
877871 fn empty_hash ( tag_name : & str ) -> [ u8 ; 32 ] {
878872 let mut e = tag_engine ( tag_name) ;
879873 e. input ( & [ ] ) ;
880874 sha256:: Hash :: from_engine ( e) . to_byte_array ( )
881875 }
876+
877+ // test that engine creation roundtrips
878+ assert_eq ! ( tag_engine( "TapLeaf/elements" ) . midstate( ) , TapLeafTag :: engine( ) . midstate( ) ) ;
879+ assert_eq ! ( tag_engine( "TapBranch/elements" ) . midstate( ) , TapBranchTag :: engine( ) . midstate( ) ) ;
880+ assert_eq ! ( tag_engine( "TapTweak/elements" ) . midstate( ) , TapTweakTag :: engine( ) . midstate( ) ) ;
881+ assert_eq ! ( tag_engine( "TapSighash/elements" ) . midstate( ) , TapSighashTag :: engine( ) . midstate( ) ) ;
882+
882883 assert_eq ! ( empty_hash( "TapLeaf/elements" ) , TapLeafHash :: hash( & [ ] ) . to_byte_array( ) ) ;
883884 assert_eq ! ( empty_hash( "TapBranch/elements" ) , TapNodeHash :: hash( & [ ] ) . to_byte_array( ) ) ;
884885 assert_eq ! ( empty_hash( "TapTweak/elements" ) , TapTweakHash :: hash( & [ ] ) . to_byte_array( ) ) ;
You can’t perform that action at this time.
0 commit comments