Skip to content

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

Merged

Conversation

TheBlueMatt
Copy link
Collaborator

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.

@TheBlueMatt TheBlueMatt added this to the 0.0.117 milestone Sep 30, 2023
@codecov-commenter
Copy link

codecov-commenter commented Sep 30, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (20f287f) 89.10% compared to head (0b4bb24) 89.52%.
Report is 19 commits behind head on main.

❗ 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              
Files Coverage Δ
lightning-background-processor/src/lib.rs 86.26% <ø> (-0.13%) ⬇️
lightning/src/ln/peer_handler.rs 58.98% <ø> (ø)

... and 17 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

`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.
@TheBlueMatt TheBlueMatt force-pushed the 2023-09-pm-no-refs-reqd branch from e8aa190 to 6482635 Compare September 30, 2023 17:58
&'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>,
Copy link
Contributor

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?

jkczyz
jkczyz previously approved these changes Oct 3, 2023
tnull
tnull previously approved these changes Oct 3, 2023
@TheBlueMatt TheBlueMatt dismissed stale reviews from tnull and jkczyz via f72ca69 October 3, 2023 03:56
jkczyz
jkczyz previously approved these changes Oct 3, 2023
Rather than simply a, b, c, d...we at least use names for a few
things, also splitting the reused 'f lifetime.
@TheBlueMatt TheBlueMatt merged commit 7aefa31 into lightningdevkit:main Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants