@@ -356,23 +356,23 @@ mod tests {
356356 ) ;
357357 }
358358
359- #[ test]
360- fn compute_tagged_hash ( ) {
361- let unsigned_invoice_request = OfferBuilder :: new ( recipient_pubkey ( ) )
362- . amount_msats ( 1000 )
363- . build ( ) . unwrap ( )
364- . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
365- . payer_note ( "bar" . into ( ) )
366- . build ( ) . unwrap ( ) ;
367-
368- // Simply test that we can grab the tag and merkle root exposed by the accessor
369- // functions, then use them to succesfully compute a tagged hash.
370- let tagged_hash = unsigned_invoice_request. as_ref ( ) ;
371- let expected_digest = unsigned_invoice_request. as_ref ( ) . as_digest ( ) ;
372- let tag = sha256:: Hash :: hash ( tagged_hash. tag ( ) . as_bytes ( ) ) ;
373- let actual_digest = Message :: from_digest ( super :: tagged_hash ( tag, tagged_hash. merkle_root ( ) ) . to_byte_array ( ) ) ;
374- assert_eq ! ( * expected_digest, actual_digest) ;
375- }
359+ #[ test]
360+ fn compute_tagged_hash ( ) {
361+ let unsigned_invoice_request = OfferBuilder :: new ( recipient_pubkey ( ) )
362+ . amount_msats ( 1000 )
363+ . build ( ) . unwrap ( )
364+ . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
365+ . payer_note ( "bar" . into ( ) )
366+ . build ( ) . unwrap ( ) ;
367+
368+ // Simply test that we can grab the tag and merkle root exposed by the accessor
369+ // functions, then use them to succesfully compute a tagged hash.
370+ let tagged_hash = unsigned_invoice_request. as_ref ( ) ;
371+ let expected_digest = unsigned_invoice_request. as_ref ( ) . as_digest ( ) ;
372+ let tag = sha256:: Hash :: hash ( tagged_hash. tag ( ) . as_bytes ( ) ) ;
373+ let actual_digest = Message :: from_digest ( super :: tagged_hash ( tag, tagged_hash. merkle_root ( ) ) . to_byte_array ( ) ) ;
374+ assert_eq ! ( * expected_digest, actual_digest) ;
375+ }
376376
377377 #[ test]
378378 fn skips_encoding_signature_tlv_records ( ) {
0 commit comments