From: Jeffrey Czyz Date: Tue, 20 Aug 2024 18:26:13 +0000 (-0500) Subject: Replace spaces with tabs X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=ad487e7232c46afd0dc3fe1fd324e7864173834f;p=rust-lightning Replace spaces with tabs --- diff --git a/lightning/src/offers/merkle.rs b/lightning/src/offers/merkle.rs index 3497881fa..209d1ebb0 100644 --- a/lightning/src/offers/merkle.rs +++ b/lightning/src/offers/merkle.rs @@ -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() {