-
Notifications
You must be signed in to change notification settings - Fork 390
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
Trivial PeerManager cleanups #2249
Trivial PeerManager cleanups #2249
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
afe92fd
to
c47bafb
Compare
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
done. |
Two rather small
PeerManager
and 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.