@@ -1222,13 +1222,20 @@ where
1222
1222
Ok ( ( msg, ctx) ) => ( msg, ctx) ,
1223
1223
Err ( ( ) ) => continue ,
1224
1224
} ;
1225
- serve_static_invoice_messages. push ( ( serve_invoice_msg, reply_path_ctx, offer_id) ) ;
1225
+ serve_static_invoice_messages. push ( (
1226
+ serve_invoice_msg,
1227
+ update_static_invoice_path. clone ( ) ,
1228
+ reply_path_ctx,
1229
+ offer_id,
1230
+ ) ) ;
1226
1231
}
1227
1232
}
1228
1233
1229
1234
// Enqueue the new serve_static_invoice messages in a separate loop to avoid holding the offer
1230
1235
// cache lock and the pending_async_payments_messages lock at the same time.
1231
- for ( serve_invoice_msg, reply_path_ctx, offer_id) in serve_static_invoice_messages {
1236
+ for ( serve_invoice_msg, serve_invoice_path, reply_path_ctx, offer_id) in
1237
+ serve_static_invoice_messages
1238
+ {
1232
1239
let context = MessageContext :: AsyncPayments ( reply_path_ctx) ;
1233
1240
let reply_paths = match self . create_blinded_paths ( peers. clone ( ) , context) {
1234
1241
Ok ( paths) => paths,
@@ -1247,7 +1254,7 @@ where
1247
1254
let message = AsyncPaymentsMessage :: ServeStaticInvoice ( serve_invoice_msg) ;
1248
1255
enqueue_onion_message_with_reply_paths (
1249
1256
message,
1250
- & self . paths_to_static_invoice_server ,
1257
+ & [ serve_invoice_path . into_reply_path ( ) ] ,
1251
1258
reply_paths,
1252
1259
& mut self . pending_async_payments_messages . lock ( ) . unwrap ( ) ,
1253
1260
) ;
0 commit comments