From b8695b0c8347e5500ecd78a740247748669b3814 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 12 Sep 2024 15:13:11 +0000 Subject: [PATCH] Check that we aren't reading a second message in BOLT 12 retry test `creates_and_pays_for_offer_with_retry` intends to check that we re-send a BOLT 12 `invoice_request` in response to a `message_received` call, but doesn't actually test that there were no messages in the outbound buffer after the initial send, which we do here. --- lightning/src/ln/offers_tests.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/lightning/src/ln/offers_tests.rs b/lightning/src/ln/offers_tests.rs index 3b9317e46..dd7ce4afb 100644 --- a/lightning/src/ln/offers_tests.rs +++ b/lightning/src/ln/offers_tests.rs @@ -1100,6 +1100,7 @@ fn creates_and_pays_for_offer_with_retry() { expect_recent_payment!(bob, RecentPaymentDetails::AwaitingInvoice, payment_id); let _lost_onion_message = bob.onion_messenger.next_onion_message_for_peer(alice_id).unwrap(); + assert!(bob.onion_messenger.next_onion_message_for_peer(alice_id).is_none()); // Simulate a scenario where the original onion_message is lost before reaching Alice. // Use handle_message_received to regenerate the message. -- 2.39.5