@@ -1147,9 +1147,12 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
1147
1147
invoice. min_final_cltv_expiry_delta ( ) as u32 ,
1148
1148
)
1149
1149
. with_expiry_time ( expiry_time. as_secs ( ) )
1150
- . with_route_hints ( invoice. route_hints ( ) ) ;
1150
+ . with_route_hints ( invoice. route_hints ( ) )
1151
+ . map_err ( |_| Error :: InvalidInvoice ) ?;
1151
1152
if let Some ( features) = invoice. features ( ) {
1152
- payment_params = payment_params. with_features ( features. clone ( ) ) ;
1153
+ payment_params = payment_params
1154
+ . with_bolt11_features ( features. clone ( ) )
1155
+ . map_err ( |_| Error :: InvalidInvoice ) ?;
1153
1156
}
1154
1157
let route_params = RouteParameters { payment_params, final_value_msat : amount_msat } ;
1155
1158
@@ -1313,9 +1316,12 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
1313
1316
invoice. min_final_cltv_expiry_delta ( ) as u32 ,
1314
1317
)
1315
1318
. with_expiry_time ( expiry_time. as_secs ( ) )
1316
- . with_route_hints ( invoice. route_hints ( ) ) ;
1319
+ . with_route_hints ( invoice. route_hints ( ) )
1320
+ . map_err ( |_| Error :: InvalidInvoice ) ?;
1317
1321
if let Some ( features) = invoice. features ( ) {
1318
- payment_params = payment_params. with_features ( features. clone ( ) ) ;
1322
+ payment_params = payment_params
1323
+ . with_bolt11_features ( features. clone ( ) )
1324
+ . map_err ( |_| Error :: InvalidInvoice ) ?;
1319
1325
}
1320
1326
let route_params = RouteParameters { payment_params, final_value_msat : amount_msat } ;
1321
1327
@@ -1356,7 +1362,7 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
1356
1362
& payer,
1357
1363
& route_params,
1358
1364
Some ( & first_hops. iter ( ) . collect :: < Vec < _ > > ( ) ) ,
1359
- & inflight_htlcs,
1365
+ inflight_htlcs,
1360
1366
)
1361
1367
. map_err ( |e| {
1362
1368
log_error ! ( self . logger, "Failed to find path for payment probe: {:?}" , e) ;
0 commit comments