Skip to content

Commit 36e06b1

Browse files
committed
f Account for updated payment params interface
1 parent b1db456 commit 36e06b1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/lib.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -576,12 +576,14 @@ impl Builder {
576576
route_handler: Arc::clone(&p2p_gossip_sync)
577577
as Arc<dyn RoutingMessageHandler + Sync + Send>,
578578
onion_message_handler: onion_messenger,
579+
custom_message_handler: IgnoringMessageHandler {},
579580
},
580581
GossipSync::Rapid(_) => MessageHandler {
581582
chan_handler: Arc::clone(&channel_manager),
582583
route_handler: Arc::new(IgnoringMessageHandler {})
583584
as Arc<dyn RoutingMessageHandler + Sync + Send>,
584585
onion_message_handler: onion_messenger,
586+
custom_message_handler: IgnoringMessageHandler {},
585587
},
586588
GossipSync::None => {
587589
unreachable!("We must always have a gossip sync!");
@@ -593,7 +595,6 @@ impl Builder {
593595
cur_time.as_secs().try_into().expect("System time error"),
594596
&ephemeral_bytes,
595597
Arc::clone(&logger),
596-
IgnoringMessageHandler {},
597598
Arc::clone(&keys_manager),
598599
));
599600

@@ -1385,9 +1386,12 @@ impl Node {
13851386
invoice.min_final_cltv_expiry_delta() as u32,
13861387
)
13871388
.with_expiry_time(expiry_time.as_secs())
1388-
.with_route_hints(invoice.route_hints());
1389+
.with_route_hints(invoice.route_hints())
1390+
.map_err(|_| Error::InvalidInvoice)?;
13891391
if let Some(features) = invoice.features() {
1390-
payment_params = payment_params.with_features(features.clone());
1392+
payment_params = payment_params
1393+
.with_bolt11_features(features.clone())
1394+
.map_err(|_| Error::InvalidInvoice)?;
13911395
}
13921396
let route_params = RouteParameters { payment_params, final_value_msat: amount_msat };
13931397

0 commit comments

Comments
 (0)