From eecc3b722379be3fb9382ede84aef8ad2b41f660 Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Fri, 26 Feb 2021 17:55:13 -0500 Subject: [PATCH] SimpleArcChannelManager type: remove outer Arc for flexibility --- background-processor/src/lib.rs | 2 +- lightning-net-tokio/src/lib.rs | 2 +- lightning/src/ln/channelmanager.rs | 2 +- lightning/src/ln/peer_handler.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/background-processor/src/lib.rs b/background-processor/src/lib.rs index 0a09ae95..0c7191fb 100644 --- a/background-processor/src/lib.rs +++ b/background-processor/src/lib.rs @@ -124,7 +124,7 @@ mod tests { type ChainMonitor = chainmonitor::ChainMonitor, Arc, Arc, Arc, Arc>; struct Node { - node: SimpleArcChannelManager, + node: Arc>, persister: Arc, logger: Arc, } diff --git a/lightning-net-tokio/src/lib.rs b/lightning-net-tokio/src/lib.rs index 051341ee..c247eba6 100644 --- a/lightning-net-tokio/src/lib.rs +++ b/lightning-net-tokio/src/lib.rs @@ -38,7 +38,7 @@ //! type ChainFilter = dyn lightning::chain::Filter; //! type DataPersister = dyn lightning::chain::channelmonitor::Persist; //! type ChainMonitor = lightning::chain::chainmonitor::ChainMonitor, Arc, Arc, Arc, Arc>; -//! type ChannelManager = lightning::ln::channelmanager::SimpleArcChannelManager; +//! type ChannelManager = Arc>; //! type PeerManager = lightning::ln::peer_handler::SimpleArcPeerManager; //! //! // Connect to node with pubkey their_node_id at addr: diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index 8fd243ae..7af34e86 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -349,7 +349,7 @@ const ERR: () = "You need at least 32 bit pointers (well, usize, but we'll assum /// issues such as overly long function definitions. Note that the ChannelManager can take any /// type that implements KeysInterface for its keys manager, but this type alias chooses the /// concrete type of the KeysManager. -pub type SimpleArcChannelManager = Arc, Arc, Arc, Arc, Arc>>; +pub type SimpleArcChannelManager = ChannelManager, Arc, Arc, Arc, Arc>; /// SimpleRefChannelManager is a type alias for a ChannelManager reference, and is the reference /// counterpart to the SimpleArcChannelManager type alias. Use this type by default when you don't diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index dbd54b3b..b5e5ebef 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -182,7 +182,7 @@ fn _check_usize_is_32_or_64() { /// lifetimes). Other times you can afford a reference, which is more efficient, in which case /// SimpleRefPeerManager is the more appropriate type. Defining these type aliases prevents /// issues such as overly long function definitions. -pub type SimpleArcPeerManager = Arc, Arc, Arc>>, Arc>>; +pub type SimpleArcPeerManager = Arc>, Arc, Arc>>, Arc>>; /// SimpleRefPeerManager is a type alias for a PeerManager reference, and is the reference /// counterpart to the SimpleArcPeerManager type alias. Use this type by default when you don't -- 2.30.2