You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into this while trying to bump LDK to v0.0.119 in ldk-sample
PR #2773 simplified GossipVerifier, that takes now a APeerManager template parameter (instead of a few ones used in the peer manager). However, in ldk-sample, a SimpleArcPeerManager is used, that takes a GossipVerifier, leading to a circular type dependency.
pub struct GossipVerifier<S: FutureSpawner,
...
{
source: Blocks,
peer_manager: Arc<PeerManager<Descriptor, CM, Arc<P2PGossipSync<Arc<NetworkGraph<L>>, Self, L>>, OM, L, CMH, NS>>,
to
peer_manager: APM,
that is, a recursive reference was removed from GossipVerifier. In case the used peer manager indeed uses a RoutingMessageHandler that uses the same GossipVerifier, this recursive reference cannot be expressed in the type parameters as type declarations have no way to be recursive.
In 6765967 we relaxed the bounds
set on `UtxoLookup` to enable those using `RoutingMessageHandler`
other than `P2PGossipSync` to use `UtxoLookup`. Sadly, because this
requires having a concrete `PeerManager` type which does *not* use
`UtxoLookup` in the `RoutingMessageHandler` type, this broke users
who were directly using `P2PGossipSync`.
We could split `UtxoLookup` into two, with different bounds, for
the two use-cases, but instead here we simply switch to storing a
reference to the `PeerManager` via a `dyn Fn` which allows us to
wake the `PeerManager` when we need to.
Fixeslightningdevkit#2813
I ran into this while trying to bump LDK to v0.0.119 in ldk-sample
PR #2773 simplified
GossipVerifier
, that takes now aAPeerManager
template parameter (instead of a few ones used in the peer manager). However, inldk-sample
, aSimpleArcPeerManager
is used, that takes aGossipVerifier
, leading to a circular type dependency.Reverting #2773 would solve this, but Options:
Currently this blocks bumping LDK to latest in
ldk-sample
. See note: lightningdevkit/ldk-sample#126 (comment)The text was updated successfully, but these errors were encountered: