Skip to content

Commit aeffcae

Browse files
Remove redundant checks in BOLT 12 invoice tests.
1 parent 1d421d3 commit aeffcae

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lightning/src/offers/invoice.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,10 +1566,8 @@ mod tests {
15661566
#[cfg(feature = "std")]
15671567
assert!(!unsigned_invoice.is_expired());
15681568
assert_eq!(unsigned_invoice.payment_hash(), payment_hash);
1569-
assert_eq!(unsigned_invoice.amount_msats(), 1000);
15701569
assert_eq!(unsigned_invoice.fallbacks(), vec![]);
15711570
assert_eq!(unsigned_invoice.invoice_features(), &Bolt12InvoiceFeatures::empty());
1572-
assert_eq!(unsigned_invoice.signing_pubkey(), recipient_pubkey());
15731571

15741572
match UnsignedBolt12Invoice::try_from(buffer) {
15751573
Err(e) => panic!("error parsing unsigned invoice: {:?}", e),
@@ -1610,10 +1608,8 @@ mod tests {
16101608
#[cfg(feature = "std")]
16111609
assert!(!invoice.is_expired());
16121610
assert_eq!(invoice.payment_hash(), payment_hash);
1613-
assert_eq!(invoice.amount_msats(), 1000);
16141611
assert_eq!(invoice.fallbacks(), vec![]);
16151612
assert_eq!(invoice.invoice_features(), &Bolt12InvoiceFeatures::empty());
1616-
assert_eq!(invoice.signing_pubkey(), recipient_pubkey());
16171613

16181614
let message = TaggedHash::from_valid_tlv_stream_bytes(SIGNATURE_TAG, &invoice.bytes);
16191615
assert!(merkle::verify_signature(&invoice.signature, &message, recipient_pubkey()).is_ok());
@@ -1708,10 +1704,8 @@ mod tests {
17081704
#[cfg(feature = "std")]
17091705
assert!(!invoice.is_expired());
17101706
assert_eq!(invoice.payment_hash(), payment_hash);
1711-
assert_eq!(invoice.amount_msats(), 1000);
17121707
assert_eq!(invoice.fallbacks(), vec![]);
17131708
assert_eq!(invoice.invoice_features(), &Bolt12InvoiceFeatures::empty());
1714-
assert_eq!(invoice.signing_pubkey(), recipient_pubkey());
17151709

17161710
let message = TaggedHash::from_valid_tlv_stream_bytes(SIGNATURE_TAG, &invoice.bytes);
17171711
assert!(merkle::verify_signature(&invoice.signature, &message, recipient_pubkey()).is_ok());

0 commit comments

Comments
 (0)