Skip to content

Commit f23b397

Browse files
committed
f Account for updated payment params interface
1 parent 642c399 commit f23b397

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
@@ -658,12 +658,14 @@ fn build_with_store_internal<K: KVStore + Sync + Send + 'static>(
658658
route_handler: Arc::clone(&p2p_gossip_sync)
659659
as Arc<dyn RoutingMessageHandler + Sync + Send>,
660660
onion_message_handler: onion_messenger,
661+
custom_message_handler: IgnoringMessageHandler {},
661662
},
662663
GossipSync::Rapid(_) => MessageHandler {
663664
chan_handler: Arc::clone(&channel_manager),
664665
route_handler: Arc::new(IgnoringMessageHandler {})
665666
as Arc<dyn RoutingMessageHandler + Sync + Send>,
666667
onion_message_handler: onion_messenger,
668+
custom_message_handler: IgnoringMessageHandler {},
667669
},
668670
GossipSync::None => {
669671
unreachable!("We must always have a gossip sync!");
@@ -675,7 +677,6 @@ fn build_with_store_internal<K: KVStore + Sync + Send + 'static>(
675677
cur_time.as_secs().try_into().map_err(|_| BuildError::InvalidSystemTime)?,
676678
&ephemeral_bytes,
677679
Arc::clone(&logger),
678-
IgnoringMessageHandler {},
679680
Arc::clone(&keys_manager),
680681
));
681682

src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,9 +1146,12 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
11461146
invoice.min_final_cltv_expiry_delta() as u32,
11471147
)
11481148
.with_expiry_time(expiry_time.as_secs())
1149-
.with_route_hints(invoice.route_hints());
1149+
.with_route_hints(invoice.route_hints())
1150+
.map_err(|_| Error::InvalidInvoice)?;
11501151
if let Some(features) = invoice.features() {
1151-
payment_params = payment_params.with_features(features.clone());
1152+
payment_params = payment_params
1153+
.with_bolt11_features(features.clone())
1154+
.map_err(|_| Error::InvalidInvoice)?;
11521155
}
11531156
let route_params = RouteParameters { payment_params, final_value_msat: amount_msat };
11541157

0 commit comments

Comments
 (0)