]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Replace spaces with tabs
authorJeffrey Czyz <jkczyz@gmail.com>
Tue, 20 Aug 2024 18:26:13 +0000 (13:26 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Mon, 11 Nov 2024 22:18:10 +0000 (16:18 -0600)
lightning/src/offers/merkle.rs

index 3497881faf99cb6fff9116446f8ce592be5089dc..209d1ebb0fde680613dc3d08c18fb79478772206 100644 (file)
@@ -364,23 +364,23 @@ mod tests {
                );
        }
 
-        #[test]
-        fn compute_tagged_hash() {
-                let unsigned_invoice_request = OfferBuilder::new(recipient_pubkey())
-                        .amount_msats(1000)
-                        .build().unwrap()
-                        .request_invoice(vec![1; 32], payer_pubkey()).unwrap()
-                        .payer_note("bar".into())
-                        .build().unwrap();
-
-                // Simply test that we can grab the tag and merkle root exposed by the accessor
-                // functions, then use them to succesfully compute a tagged hash.
-                let tagged_hash = unsigned_invoice_request.as_ref();
-                let expected_digest = unsigned_invoice_request.as_ref().as_digest();
-                let tag = sha256::Hash::hash(tagged_hash.tag().as_bytes());
-                let actual_digest = Message::from_digest(super::tagged_hash(tag, tagged_hash.merkle_root()).to_byte_array());
-                assert_eq!(*expected_digest, actual_digest);
-        }
+       #[test]
+       fn compute_tagged_hash() {
+               let unsigned_invoice_request = OfferBuilder::new(recipient_pubkey())
+                       .amount_msats(1000)
+                       .build().unwrap()
+                       .request_invoice(vec![1; 32], payer_pubkey()).unwrap()
+                       .payer_note("bar".into())
+                       .build().unwrap();
+
+               // Simply test that we can grab the tag and merkle root exposed by the accessor
+               // functions, then use them to succesfully compute a tagged hash.
+               let tagged_hash = unsigned_invoice_request.as_ref();
+               let expected_digest = unsigned_invoice_request.as_ref().as_digest();
+               let tag = sha256::Hash::hash(tagged_hash.tag().as_bytes());
+               let actual_digest = Message::from_digest(super::tagged_hash(tag, tagged_hash.merkle_root()).to_byte_array());
+               assert_eq!(*expected_digest, actual_digest);
+       }
 
        #[test]
        fn skips_encoding_signature_tlv_records() {