Skip to content

Commit 0e41d80

Browse files
committed
Use ChannelManager as OffersMessageHandler
1 parent debc20c commit 0e41d80

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

lightning/src/ln/peer_handler.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ pub type SimpleArcPeerManager<SD, M, T, F, C, L> = PeerManager<
613613
SD,
614614
Arc<SimpleArcChannelManager<M, T, F, L>>,
615615
Arc<P2PGossipSync<Arc<NetworkGraph<Arc<L>>>, C, Arc<L>>>,
616-
Arc<SimpleArcOnionMessenger<L>>,
616+
Arc<SimpleArcOnionMessenger<M, T, F, L>>,
617617
Arc<L>,
618618
IgnoringMessageHandler,
619619
Arc<KeysManager>
@@ -628,12 +628,12 @@ pub type SimpleArcPeerManager<SD, M, T, F, C, L> = PeerManager<
628628
///
629629
/// This is not exported to bindings users as general type aliases don't make sense in bindings.
630630
pub type SimpleRefPeerManager<
631-
'a, 'b, 'c, 'd, 'e, 'f, 'logger, 'h, 'i, 'j, 'graph, SD, M, T, F, C, L
631+
'a, 'b, 'c, 'd, 'e, 'f, 'logger, 'h, 'i, 'j, 'graph, 'k, SD, M, T, F, C, L
632632
> = PeerManager<
633633
SD,
634634
&'j SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, 'graph, 'logger, 'i, M, T, F, L>,
635635
&'f P2PGossipSync<&'graph NetworkGraph<&'logger L>, C, &'logger L>,
636-
&'h SimpleRefOnionMessenger<'logger, 'i, 'j, L>,
636+
&'h SimpleRefOnionMessenger<'a, 'b, 'c, 'd, 'e, 'graph, 'logger, 'i, 'j, 'k, M, T, F, L>,
637637
&'logger L,
638638
IgnoringMessageHandler,
639639
&'c KeysManager

lightning/src/onion_message/messenger.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use crate::blinded_path::BlindedPath;
1919
use crate::blinded_path::message::{advance_path_by_one, ForwardTlvs, ReceiveTlvs};
2020
use crate::blinded_path::utils;
2121
use crate::sign::{EntropySource, KeysManager, NodeSigner, Recipient};
22+
use crate::ln::channelmanager::{SimpleArcChannelManager, SimpleRefChannelManager};
2223
use crate::ln::features::{InitFeatures, NodeFeatures};
2324
use crate::ln::msgs::{self, OnionMessage, OnionMessageHandler};
2425
use crate::ln::onion_utils;
@@ -704,12 +705,12 @@ where
704705
///
705706
/// [`SimpleArcChannelManager`]: crate::ln::channelmanager::SimpleArcChannelManager
706707
/// [`SimpleArcPeerManager`]: crate::ln::peer_handler::SimpleArcPeerManager
707-
pub type SimpleArcOnionMessenger<L> = OnionMessenger<
708+
pub type SimpleArcOnionMessenger<M, T, F, L> = OnionMessenger<
708709
Arc<KeysManager>,
709710
Arc<KeysManager>,
710711
Arc<L>,
711712
Arc<DefaultMessageRouter>,
712-
IgnoringMessageHandler,
713+
Arc<SimpleArcChannelManager<M, T, F, L>>,
713714
IgnoringMessageHandler
714715
>;
715716

@@ -720,12 +721,14 @@ pub type SimpleArcOnionMessenger<L> = OnionMessenger<
720721
///
721722
/// [`SimpleRefChannelManager`]: crate::ln::channelmanager::SimpleRefChannelManager
722723
/// [`SimpleRefPeerManager`]: crate::ln::peer_handler::SimpleRefPeerManager
723-
pub type SimpleRefOnionMessenger<'a, 'b, 'c, L> = OnionMessenger<
724+
pub type SimpleRefOnionMessenger<
725+
'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, M, T, F, L
726+
> = OnionMessenger<
724727
&'a KeysManager,
725728
&'a KeysManager,
726729
&'b L,
727-
&'c DefaultMessageRouter,
728-
IgnoringMessageHandler,
730+
&'i DefaultMessageRouter,
731+
&'j SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, M, T, F, L>,
729732
IgnoringMessageHandler
730733
>;
731734

0 commit comments

Comments
 (0)