Trivial PeerManager cleanups#2249
Merged
TheBlueMatt merged 2 commits intolightningdevkit:mainfrom May 3, 2023
Merged
Conversation
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #2249 +/- ##
==========================================
- Coverage 91.59% 91.59% -0.01%
==========================================
Files 104 104
Lines 51976 51981 +5
Branches 51976 51981 +5
==========================================
+ Hits 47609 47613 +4
- Misses 4367 4368 +1
☔ View full report in Codecov by Sentry. |
`PeerManager` takes a `MessageHandler` struct which contains all the known message handlers for it to pass messages to. It then, separately, takes a `CustomMessageHandler`. This makes no sense, we should simply include the `CustomMessageHandler` in the `MessageHandler` struct for consistency.
b65e389 to
8ec1ddf
Compare
valentinewallace
previously approved these changes
May 1, 2023
wpaulino
reviewed
May 2, 2023
afe92fd to
c47bafb
Compare
Contributor
|
LGTM after squash |
A while back, in tests, we added a `AChannelManager` trait, which is implemented for all `ChannelManager`s, and can be used as a bound when we need a `ChannelManager`, rather than having to duplicate all the bounds of `ChannelManager` everywhere. Here we do the same thing for `PeerManager`, but make it public and use it to clean up `lightning-net-tokio` and `lightning-background-processor`. We should likely do the same for `AChannelManager`, but that's left as a followup.
c47bafb to
14c6810
Compare
Collaborator
Author
|
done. |
valentinewallace
approved these changes
May 2, 2023
wpaulino
approved these changes
May 2, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two rather small
PeerManagerand downstream things type cleanups. I originally wrote the second to make #2248 cleaner, but it actually can't be used for that as it leads to circular type definitions.