From: Valentine Wallace Date: Fri, 26 Feb 2021 22:58:56 +0000 (-0500) Subject: SimpleArcPeerManager type: remove outer Arc for flexibility X-Git-Tag: v0.0.13~14^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=a2d9fca9d50ce6c05135f0b38743404bd5c75d8f;p=rust-lightning SimpleArcPeerManager type: remove outer Arc for flexibility --- 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