X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-net-tokio%2Fsrc%2Flib.rs;h=36384380fb14a458b31e132446ae374ffaf0b51d;hb=90b668e426ab0a9867458369c9b4739e77f3596d;hp=2ab2e7d4a3501981f35edc345bd2c5e86b0fc4ee;hpb=87398be29354ea0e844a13c6e6988c8152d31a18;p=rust-lightning diff --git a/lightning-net-tokio/src/lib.rs b/lightning-net-tokio/src/lib.rs index 2ab2e7d4..36384380 100644 --- a/lightning-net-tokio/src/lib.rs +++ b/lightning-net-tokio/src/lib.rs @@ -34,13 +34,15 @@ //! type TxBroadcaster = dyn lightning::chain::chaininterface::BroadcasterInterface; //! type FeeEstimator = dyn lightning::chain::chaininterface::FeeEstimator; //! type Logger = dyn lightning::util::logger::Logger; -//! type ChainWatchInterface = dyn lightning::chain::chaininterface::ChainWatchInterface; -//! type ChannelMonitor = lightning::ln::channelmonitor::SimpleManyChannelMonitor, Arc, Arc>; -//! type ChannelManager = lightning::ln::channelmanager::SimpleArcChannelManager; -//! type PeerManager = lightning::ln::peer_handler::SimpleArcPeerManager; +//! type ChainAccess = dyn lightning::chain::Access; +//! 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 PeerManager = lightning::ln::peer_handler::SimpleArcPeerManager; //! //! // Connect to node with pubkey their_node_id at addr: -//! async fn connect_to_node(peer_manager: PeerManager, channel_monitor: Arc, channel_manager: ChannelManager, their_node_id: PublicKey, addr: SocketAddr) { +//! async fn connect_to_node(peer_manager: PeerManager, chain_monitor: Arc, channel_manager: ChannelManager, their_node_id: PublicKey, addr: SocketAddr) { //! let (sender, mut receiver) = mpsc::channel(2); //! lightning_net_tokio::connect_outbound(peer_manager, sender, their_node_id, addr).await; //! loop { @@ -48,14 +50,14 @@ //! for _event in channel_manager.get_and_clear_pending_events().drain(..) { //! // Handle the event! //! } -//! for _event in channel_monitor.get_and_clear_pending_events().drain(..) { +//! for _event in chain_monitor.get_and_clear_pending_events().drain(..) { //! // Handle the event! //! } //! } //! } //! //! // Begin reading from a newly accepted socket and talk to the peer: -//! async fn accept_socket(peer_manager: PeerManager, channel_monitor: Arc, channel_manager: ChannelManager, socket: TcpStream) { +//! async fn accept_socket(peer_manager: PeerManager, chain_monitor: Arc, channel_manager: ChannelManager, socket: TcpStream) { //! let (sender, mut receiver) = mpsc::channel(2); //! lightning_net_tokio::setup_inbound(peer_manager, sender, socket); //! loop { @@ -63,7 +65,7 @@ //! for _event in channel_manager.get_and_clear_pending_events().drain(..) { //! // Handle the event! //! } -//! for _event in channel_monitor.get_and_clear_pending_events().drain(..) { +//! for _event in chain_monitor.get_and_clear_pending_events().drain(..) { //! // Handle the event! //! } //! }