Skip to content

Commit a1d0abc

Browse files
committed
f Account for updated payment params interface
1 parent d75c4aa commit a1d0abc

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/builder.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,12 +647,14 @@ fn build_with_store_internal<K: KVStore + Sync + Send + 'static>(
647647
route_handler: Arc::clone(&p2p_gossip_sync)
648648
as Arc<dyn RoutingMessageHandler + Sync + Send>,
649649
onion_message_handler: onion_messenger,
650+
custom_message_handler: IgnoringMessageHandler {},
650651
},
651652
GossipSync::Rapid(_) => MessageHandler {
652653
chan_handler: Arc::clone(&channel_manager),
653654
route_handler: Arc::new(IgnoringMessageHandler {})
654655
as Arc<dyn RoutingMessageHandler + Sync + Send>,
655656
onion_message_handler: onion_messenger,
657+
custom_message_handler: IgnoringMessageHandler {},
656658
},
657659
GossipSync::None => {
658660
unreachable!("We must always have a gossip sync!");
@@ -664,7 +666,6 @@ fn build_with_store_internal<K: KVStore + Sync + Send + 'static>(
664666
cur_time.as_secs().try_into().map_err(|_| BuildError::InvalidSystemTime)?,
665667
&ephemeral_bytes,
666668
Arc::clone(&logger),
667-
IgnoringMessageHandler {},
668669
Arc::clone(&keys_manager),
669670
));
670671

src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,9 +1140,12 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
11401140
invoice.min_final_cltv_expiry_delta() as u32,
11411141
)
11421142
.with_expiry_time(expiry_time.as_secs())
1143-
.with_route_hints(invoice.route_hints());
1143+
.with_route_hints(invoice.route_hints())
1144+
.map_err(|_| Error::InvalidInvoice)?;
11441145
if let Some(features) = invoice.features() {
1145-
payment_params = payment_params.with_features(features.clone());
1146+
payment_params = payment_params
1147+
.with_bolt11_features(features.clone())
1148+
.map_err(|_| Error::InvalidInvoice)?;
11461149
}
11471150
let route_params = RouteParameters { payment_params, final_value_msat: amount_msat };
11481151

0 commit comments

Comments
 (0)