Skip to content

Commit 6aa1be4

Browse files
committed
f Account for updated payment params interface
1 parent a4fa271 commit 6aa1be4

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
@@ -571,12 +571,14 @@ impl Builder {
571571
route_handler: Arc::clone(&p2p_gossip_sync)
572572
as Arc<dyn RoutingMessageHandler + Sync + Send>,
573573
onion_message_handler: onion_messenger,
574+
custom_message_handler: IgnoringMessageHandler {},
574575
},
575576
GossipSync::Rapid(_) => MessageHandler {
576577
chan_handler: Arc::clone(&channel_manager),
577578
route_handler: Arc::new(IgnoringMessageHandler {})
578579
as Arc<dyn RoutingMessageHandler + Sync + Send>,
579580
onion_message_handler: onion_messenger,
581+
custom_message_handler: IgnoringMessageHandler {},
580582
},
581583
GossipSync::None => {
582584
unreachable!("We must always have a gossip sync!");
@@ -588,7 +590,6 @@ impl Builder {
588590
cur_time.as_secs().try_into().expect("System time error"),
589591
&ephemeral_bytes,
590592
Arc::clone(&logger),
591-
IgnoringMessageHandler {},
592593
Arc::clone(&keys_manager),
593594
));
594595

@@ -1335,9 +1336,12 @@ impl Node {
13351336
invoice.min_final_cltv_expiry_delta() as u32,
13361337
)
13371338
.with_expiry_time(expiry_time.as_secs())
1338-
.with_route_hints(invoice.route_hints());
1339+
.with_route_hints(invoice.route_hints())
1340+
.map_err(|_| Error::InvalidInvoice)?;
13391341
if let Some(features) = invoice.features() {
1340-
payment_params = payment_params.with_features(features.clone());
1342+
payment_params = payment_params
1343+
.with_bolt11_features(features.clone())
1344+
.map_err(|_| Error::InvalidInvoice)?;
13411345
}
13421346
let route_params = RouteParameters { payment_params, final_value_msat: amount_msat };
13431347

0 commit comments

Comments
 (0)