Skip to content

Commit b8695b0

Browse files
committed
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.
1 parent 1059f5f commit b8695b0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lightning/src/ln/offers_tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,6 +1100,7 @@ fn creates_and_pays_for_offer_with_retry() {
11001100
expect_recent_payment!(bob, RecentPaymentDetails::AwaitingInvoice, payment_id);
11011101

11021102
let _lost_onion_message = bob.onion_messenger.next_onion_message_for_peer(alice_id).unwrap();
1103+
assert!(bob.onion_messenger.next_onion_message_for_peer(alice_id).is_none());
11031104

11041105
// Simulate a scenario where the original onion_message is lost before reaching Alice.
11051106
// Use handle_message_received to regenerate the message.

0 commit comments

Comments
 (0)