From: Jeffrey Czyz Date: Tue, 6 Jun 2023 17:00:54 +0000 (-0500) Subject: Use ChannelManager as OffersMessageHandler X-Git-Tag: v0.0.118~6^2~8 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=0e41d8085a32dd9065128f391fba978cdc681cb5;p=rust-lightning Use ChannelManager as OffersMessageHandler --- diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index fc574251f..44d2a87a8 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -613,7 +613,7 @@ pub type SimpleArcPeerManager = PeerManager< SD, Arc>, Arc>>, C, Arc>>, - Arc>, + Arc>, Arc, IgnoringMessageHandler, Arc @@ -628,12 +628,12 @@ pub type SimpleArcPeerManager = PeerManager< /// /// This is not exported to bindings users as general type aliases don't make sense in bindings. pub type SimpleRefPeerManager< - 'a, 'b, 'c, 'd, 'e, 'f, 'logger, 'h, 'i, 'j, 'graph, SD, M, T, F, C, L + 'a, 'b, 'c, 'd, 'e, 'f, 'logger, 'h, 'i, 'j, 'graph, 'k, SD, M, T, F, C, L > = PeerManager< SD, &'j SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, 'graph, 'logger, 'i, M, T, F, L>, &'f P2PGossipSync<&'graph NetworkGraph<&'logger L>, C, &'logger L>, - &'h SimpleRefOnionMessenger<'logger, 'i, 'j, L>, + &'h SimpleRefOnionMessenger<'a, 'b, 'c, 'd, 'e, 'graph, 'logger, 'i, 'j, 'k, M, T, F, L>, &'logger L, IgnoringMessageHandler, &'c KeysManager diff --git a/lightning/src/onion_message/messenger.rs b/lightning/src/onion_message/messenger.rs index 8960058fa..ba343ec6e 100644 --- a/lightning/src/onion_message/messenger.rs +++ b/lightning/src/onion_message/messenger.rs @@ -19,6 +19,7 @@ use crate::blinded_path::BlindedPath; use crate::blinded_path::message::{advance_path_by_one, ForwardTlvs, ReceiveTlvs}; use crate::blinded_path::utils; use crate::sign::{EntropySource, KeysManager, NodeSigner, Recipient}; +use crate::ln::channelmanager::{SimpleArcChannelManager, SimpleRefChannelManager}; use crate::ln::features::{InitFeatures, NodeFeatures}; use crate::ln::msgs::{self, OnionMessage, OnionMessageHandler}; use crate::ln::onion_utils; @@ -704,12 +705,12 @@ where /// /// [`SimpleArcChannelManager`]: crate::ln::channelmanager::SimpleArcChannelManager /// [`SimpleArcPeerManager`]: crate::ln::peer_handler::SimpleArcPeerManager -pub type SimpleArcOnionMessenger = OnionMessenger< +pub type SimpleArcOnionMessenger = OnionMessenger< Arc, Arc, Arc, Arc, - IgnoringMessageHandler, + Arc>, IgnoringMessageHandler >; @@ -720,12 +721,14 @@ pub type SimpleArcOnionMessenger = OnionMessenger< /// /// [`SimpleRefChannelManager`]: crate::ln::channelmanager::SimpleRefChannelManager /// [`SimpleRefPeerManager`]: crate::ln::peer_handler::SimpleRefPeerManager -pub type SimpleRefOnionMessenger<'a, 'b, 'c, L> = OnionMessenger< +pub type SimpleRefOnionMessenger< + 'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, M, T, F, L +> = OnionMessenger< &'a KeysManager, &'a KeysManager, &'b L, - &'c DefaultMessageRouter, - IgnoringMessageHandler, + &'i DefaultMessageRouter, + &'j SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, M, T, F, L>, IgnoringMessageHandler >;