@@ -66,7 +66,6 @@ use core::time::Duration;
66
66
struct StaticInvoiceServerFlowResult {
67
67
invoice : StaticInvoice ,
68
68
invoice_slot : u16 ,
69
- invoice_id : u128 ,
70
69
71
70
// Returning messages that were sent along the way allows us to test handling duplicate messages.
72
71
offer_paths_request : msgs:: OnionMessage ,
@@ -148,16 +147,15 @@ fn pass_static_invoice_server_messages(
148
147
// that the static invoice should be persisted.
149
148
let mut events = server. node . get_and_clear_pending_events ( ) ;
150
149
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 ( ) {
152
151
Event :: PersistStaticInvoice {
153
152
invoice,
154
153
invoice_persisted_path,
155
154
recipient_id : ev_id,
156
155
invoice_slot,
157
- invoice_id,
158
156
} => {
159
157
assert_eq ! ( recipient_id, ev_id) ;
160
- ( invoice, invoice_slot, invoice_id , invoice_persisted_path)
158
+ ( invoice, invoice_slot, invoice_persisted_path)
161
159
} ,
162
160
_ => panic ! ( ) ,
163
161
} ;
@@ -183,7 +181,6 @@ fn pass_static_invoice_server_messages(
183
181
static_invoice_persisted_message : invoice_persisted_om,
184
182
invoice,
185
183
invoice_slot,
186
- invoice_id,
187
184
}
188
185
}
189
186
@@ -1626,13 +1623,13 @@ fn limit_serve_static_invoice_requests() {
1626
1623
1627
1624
// Build the target number of offers interactively with the static invoice server.
1628
1625
let mut offer_paths_req = None ;
1629
- let mut invoice_ids = new_hash_set ( ) ;
1626
+ let mut invoice_slots = new_hash_set ( ) ;
1630
1627
for expected_inv_slot in 0 ..TEST_MAX_CACHED_OFFERS_TARGET {
1631
1628
let flow_res = pass_static_invoice_server_messages ( server, recipient, recipient_id. clone ( ) ) ;
1632
1629
assert_eq ! ( flow_res. invoice_slot, expected_inv_slot as u16 ) ;
1633
1630
1634
1631
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 ) ;
1636
1633
1637
1634
// Trigger a cache refresh
1638
1635
recipient. node . timer_tick_occurred ( ) ;
@@ -1641,8 +1638,8 @@ fn limit_serve_static_invoice_requests() {
1641
1638
recipient. node. flow. test_get_async_receive_offers( ) . len( ) ,
1642
1639
TEST_MAX_CACHED_OFFERS_TARGET
1643
1640
) ;
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 ) ;
1646
1643
1647
1644
// Force allowing more offer paths request attempts so we can check that the recipient will not
1648
1645
// attempt to build any further offers.
@@ -1822,16 +1819,15 @@ fn refresh_static_invoices_for_used_offers() {
1822
1819
Event :: PersistStaticInvoice {
1823
1820
invoice,
1824
1821
invoice_slot,
1825
- invoice_id,
1826
1822
invoice_persisted_path,
1827
1823
recipient_id : ev_id,
1828
1824
} => {
1829
1825
assert_ne ! ( original_invoice, invoice) ;
1830
1826
assert_eq ! ( recipient_id, ev_id) ;
1831
1827
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
1833
1829
// same.
1834
- assert_eq ! ( invoice_id , flow_res. invoice_id ) ;
1830
+ assert_eq ! ( invoice_slot , flow_res. invoice_slot ) ;
1835
1831
( invoice, invoice_persisted_path)
1836
1832
} ,
1837
1833
_ => panic ! ( ) ,
0 commit comments