@@ -66,7 +66,6 @@ use core::time::Duration;
6666struct StaticInvoiceServerFlowResult {
6767 invoice : StaticInvoice ,
6868 invoice_slot : u16 ,
69- invoice_id : u128 ,
7069
7170 // Returning messages that were sent along the way allows us to test handling duplicate messages.
7271 offer_paths_request : msgs:: OnionMessage ,
@@ -148,16 +147,15 @@ fn pass_static_invoice_server_messages(
148147 // that the static invoice should be persisted.
149148 let mut events = server. node . get_and_clear_pending_events ( ) ;
150149 assert_eq ! ( events. len( ) , 1 ) ;
151- let ( invoice, invoice_slot, invoice_id , ack_path) = match events. pop ( ) . unwrap ( ) {
150+ let ( invoice, invoice_slot, ack_path) = match events. pop ( ) . unwrap ( ) {
152151 Event :: PersistStaticInvoice {
153152 invoice,
154153 invoice_persisted_path,
155154 recipient_id : ev_id,
156155 invoice_slot,
157- invoice_id,
158156 } => {
159157 assert_eq ! ( recipient_id, ev_id) ;
160- ( invoice, invoice_slot, invoice_id , invoice_persisted_path)
158+ ( invoice, invoice_slot, invoice_persisted_path)
161159 } ,
162160 _ => panic ! ( ) ,
163161 } ;
@@ -183,7 +181,6 @@ fn pass_static_invoice_server_messages(
183181 static_invoice_persisted_message : invoice_persisted_om,
184182 invoice,
185183 invoice_slot,
186- invoice_id,
187184 }
188185}
189186
@@ -1626,13 +1623,13 @@ fn limit_serve_static_invoice_requests() {
16261623
16271624 // Build the target number of offers interactively with the static invoice server.
16281625 let mut offer_paths_req = None ;
1629- let mut invoice_ids = new_hash_set ( ) ;
1626+ let mut invoice_slots = new_hash_set ( ) ;
16301627 for expected_inv_slot in 0 ..TEST_MAX_CACHED_OFFERS_TARGET {
16311628 let flow_res = pass_static_invoice_server_messages ( server, recipient, recipient_id. clone ( ) ) ;
16321629 assert_eq ! ( flow_res. invoice_slot, expected_inv_slot as u16 ) ;
16331630
16341631 offer_paths_req = Some ( flow_res. offer_paths_request ) ;
1635- invoice_ids . insert ( flow_res. invoice_id ) ;
1632+ invoice_slots . insert ( flow_res. invoice_slot ) ;
16361633
16371634 // Trigger a cache refresh
16381635 recipient. node . timer_tick_occurred ( ) ;
@@ -1641,8 +1638,8 @@ fn limit_serve_static_invoice_requests() {
16411638 recipient. node. flow. test_get_async_receive_offers( ) . len( ) ,
16421639 TEST_MAX_CACHED_OFFERS_TARGET
16431640 ) ;
1644- // Check that all invoice ids are unique.
1645- assert_eq ! ( invoice_ids . len( ) , TEST_MAX_CACHED_OFFERS_TARGET ) ;
1641+ // Check that all invoice slot numbers are unique.
1642+ assert_eq ! ( invoice_slots . len( ) , TEST_MAX_CACHED_OFFERS_TARGET ) ;
16461643
16471644 // Force allowing more offer paths request attempts so we can check that the recipient will not
16481645 // attempt to build any further offers.
@@ -1822,16 +1819,15 @@ fn refresh_static_invoices_for_used_offers() {
18221819 Event :: PersistStaticInvoice {
18231820 invoice,
18241821 invoice_slot,
1825- invoice_id,
18261822 invoice_persisted_path,
18271823 recipient_id : ev_id,
18281824 } => {
18291825 assert_ne ! ( original_invoice, invoice) ;
18301826 assert_eq ! ( recipient_id, ev_id) ;
18311827 assert_eq ! ( invoice_slot, flow_res. invoice_slot) ;
1832- // When we update the invoice corresponding to a specific offer, the invoice_id stays the
1828+ // When we update the invoice corresponding to a specific offer, the invoice_slot stays the
18331829 // same.
1834- assert_eq ! ( invoice_id , flow_res. invoice_id ) ;
1830+ assert_eq ! ( invoice_slot , flow_res. invoice_slot ) ;
18351831 ( invoice, invoice_persisted_path)
18361832 } ,
18371833 _ => panic ! ( ) ,
0 commit comments