From a2d9fca9d50ce6c05135f0b38743404bd5c75d8f Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Fri, 26 Feb 2021 17:58:56 -0500 Subject: [PATCH] SimpleArcPeerManager type: remove outer Arc for flexibility --- lightning-net-tokio/src/lib.rs | 2 +- lightning/src/ln/peer_handler.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lightning-net-tokio/src/lib.rs b/lightning-net-tokio/src/lib.rs index c247eba6d..8c9833308 100644 --- a/lightning-net-tokio/src/lib.rs +++ b/lightning-net-tokio/src/lib.rs @@ -39,7 +39,7 @@ //! type DataPersister = dyn lightning::chain::channelmonitor::Persist; //! type ChainMonitor = lightning::chain::chainmonitor::ChainMonitor, Arc, Arc, Arc, Arc>; //! type ChannelManager = Arc>; -//! type PeerManager = lightning::ln::peer_handler::SimpleArcPeerManager; +//! type PeerManager = Arc>; //! //! // Connect to node with pubkey their_node_id at addr: //! async fn connect_to_node(peer_manager: PeerManager, chain_monitor: Arc, channel_manager: ChannelManager, their_node_id: PublicKey, addr: SocketAddr) { diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index b5e5ebef2..6edd95415 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 = PeerManager>, 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.39.5