From: Valentine Wallace Date: Thu, 23 May 2024 15:00:40 +0000 (-0400) Subject: Remove redundant checks in BOLT 12 invoice tests. X-Git-Tag: v0.0.124-beta~83^2~11 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=f18b490d8775d3395e937330daa4b470e5e33085;p=rust-lightning Remove redundant checks in BOLT 12 invoice tests. --- diff --git a/lightning/src/offers/invoice.rs b/lightning/src/offers/invoice.rs index 5482e6f83..4206e67d2 100644 --- a/lightning/src/offers/invoice.rs +++ b/lightning/src/offers/invoice.rs @@ -1566,10 +1566,8 @@ mod tests { #[cfg(feature = "std")] assert!(!unsigned_invoice.is_expired()); assert_eq!(unsigned_invoice.payment_hash(), payment_hash); - assert_eq!(unsigned_invoice.amount_msats(), 1000); assert!(unsigned_invoice.fallbacks().is_empty()); assert_eq!(unsigned_invoice.invoice_features(), &Bolt12InvoiceFeatures::empty()); - assert_eq!(unsigned_invoice.signing_pubkey(), recipient_pubkey()); match UnsignedBolt12Invoice::try_from(buffer) { Err(e) => panic!("error parsing unsigned invoice: {:?}", e), @@ -1610,10 +1608,8 @@ mod tests { #[cfg(feature = "std")] assert!(!invoice.is_expired()); assert_eq!(invoice.payment_hash(), payment_hash); - assert_eq!(invoice.amount_msats(), 1000); assert!(invoice.fallbacks().is_empty()); assert_eq!(invoice.invoice_features(), &Bolt12InvoiceFeatures::empty()); - assert_eq!(invoice.signing_pubkey(), recipient_pubkey()); let message = TaggedHash::from_valid_tlv_stream_bytes(SIGNATURE_TAG, &invoice.bytes); assert!(merkle::verify_signature(&invoice.signature, &message, recipient_pubkey()).is_ok()); @@ -1708,10 +1704,8 @@ mod tests { #[cfg(feature = "std")] assert!(!invoice.is_expired()); assert_eq!(invoice.payment_hash(), payment_hash); - assert_eq!(invoice.amount_msats(), 1000); assert!(invoice.fallbacks().is_empty()); assert_eq!(invoice.invoice_features(), &Bolt12InvoiceFeatures::empty()); - assert_eq!(invoice.signing_pubkey(), recipient_pubkey()); let message = TaggedHash::from_valid_tlv_stream_bytes(SIGNATURE_TAG, &invoice.bytes); assert!(merkle::verify_signature(&invoice.signature, &message, recipient_pubkey()).is_ok());