mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-01-19 05:43:55 +01:00
Fix Simple*PeerManager
to not require refs to the UtxoLookup
`UtxoLookup` doesn't strictly need to be referenced from the `PeerManager`, and in fact the new `GossipVerifier` in `lightning-block-sync` requires itself to be owned by the `PeerManager` (for circular type reasons). This allows us to use `lightning-block-sync`'s `GossipVerifier` with `SimpleArcPeerManager` in ldk-sample.
This commit is contained in:
parent
20f287f439
commit
6482635ba6
@ -528,7 +528,7 @@ use core::task;
|
||||
/// # type MyFilter = dyn lightning::chain::Filter + Send + Sync;
|
||||
/// # type MyLogger = dyn lightning::util::logger::Logger + Send + Sync;
|
||||
/// # type MyChainMonitor = lightning::chain::chainmonitor::ChainMonitor<lightning::sign::InMemorySigner, Arc<MyFilter>, Arc<MyBroadcaster>, Arc<MyFeeEstimator>, Arc<MyLogger>, Arc<MyStore>>;
|
||||
/// # type MyPeerManager = lightning::ln::peer_handler::SimpleArcPeerManager<MySocketDescriptor, MyChainMonitor, MyBroadcaster, MyFeeEstimator, MyUtxoLookup, MyLogger>;
|
||||
/// # type MyPeerManager = lightning::ln::peer_handler::SimpleArcPeerManager<MySocketDescriptor, MyChainMonitor, MyBroadcaster, MyFeeEstimator, Arc<MyUtxoLookup>, MyLogger>;
|
||||
/// # type MyNetworkGraph = lightning::routing::gossip::NetworkGraph<Arc<MyLogger>>;
|
||||
/// # type MyGossipSync = lightning::routing::gossip::P2PGossipSync<Arc<MyNetworkGraph>, Arc<MyUtxoLookup>, Arc<MyLogger>>;
|
||||
/// # type MyChannelManager = lightning::ln::channelmanager::SimpleArcChannelManager<MyChainMonitor, MyBroadcaster, MyFeeEstimator, MyLogger>;
|
||||
|
@ -611,7 +611,7 @@ impl Peer {
|
||||
pub type SimpleArcPeerManager<SD, M, T, F, C, L> = PeerManager<
|
||||
SD,
|
||||
Arc<SimpleArcChannelManager<M, T, F, L>>,
|
||||
Arc<P2PGossipSync<Arc<NetworkGraph<Arc<L>>>, Arc<C>, Arc<L>>>,
|
||||
Arc<P2PGossipSync<Arc<NetworkGraph<Arc<L>>>, C, Arc<L>>>,
|
||||
Arc<SimpleArcOnionMessenger<L>>,
|
||||
Arc<L>,
|
||||
IgnoringMessageHandler,
|
||||
@ -627,12 +627,12 @@ pub type SimpleArcPeerManager<SD, M, T, F, C, L> = 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, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, SD, M, T, F, C, L
|
||||
'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, SD, M, T, F, C, L
|
||||
> = PeerManager<
|
||||
SD,
|
||||
&'n SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'm, M, T, F, L>,
|
||||
&'f P2PGossipSync<&'g NetworkGraph<&'f L>, &'h C, &'f L>,
|
||||
&'i SimpleRefOnionMessenger<'g, 'm, 'n, L>,
|
||||
&'j SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'i, M, T, F, L>,
|
||||
&'f P2PGossipSync<&'g NetworkGraph<&'f L>, C, &'f L>,
|
||||
&'h SimpleRefOnionMessenger<'g, 'i, 'j, L>,
|
||||
&'f L,
|
||||
IgnoringMessageHandler,
|
||||
&'c KeysManager
|
||||
|
Loading…
Reference in New Issue
Block a user