-
Notifications
You must be signed in to change notification settings - Fork 412
Fix Simple*PeerManager
to not require refs to the UtxoLookup
#2631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Simple*PeerManager
to not require refs to the UtxoLookup
#2631
Conversation
Codecov ReportAll modified lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #2631 +/- ##
==========================================
+ Coverage 89.10% 89.52% +0.41%
==========================================
Files 112 112
Lines 86932 90795 +3863
Branches 86932 90795 +3863
==========================================
+ Hits 77465 81283 +3818
- Misses 7239 7284 +45
Partials 2228 2228
☔ View full report in Codecov by Sentry. |
`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.
e8aa190
to
6482635
Compare
lightning/src/ln/peer_handler.rs
Outdated
&'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>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks preexisting, but should we use different lifetime than 'f
for P2PGossipSync
given it uses that lifetime for its parameters?
Rather than simply a, b, c, d...we at least use names for a few things, also splitting the reused 'f lifetime.
f72ca69
to
0b4bb24
Compare
UtxoLookup
doesn't strictly need to be referenced from thePeerManager
, and in fact the newGossipVerifier
inlightning-block-sync
requires itself to be owned by thePeerManager
(for circular type reasons).This allows us to use
lightning-block-sync
'sGossipVerifier
withSimpleArcPeerManager
in ldk-sample.