-
Notifications
You must be signed in to change notification settings - Fork 411
Prep background-processor for bindings inclusion #884
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
Prep background-processor for bindings inclusion #884
Conversation
Codecov Report
@@ Coverage Diff @@
## main #884 +/- ##
==========================================
- Coverage 90.26% 90.22% -0.04%
==========================================
Files 55 55
Lines 29088 29091 +3
==========================================
- Hits 26255 26248 -7
- Misses 2833 2843 +10
Continue to review full report at Codecov.
|
CM: 'static + Deref<Target = ChannelManager<Signer, M, T, K, F, L>> + Send + Sync, | ||
PM: 'static + Deref<Target = PeerManager<Descriptor, CMH, RMH, L>> + Send + Sync, | ||
> | ||
(handler: CMP, channel_manager: CM, peer_manager: PM, logger: L) -> Self |
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.
suggestion: rename handler to persister
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.
So I did handler because (hopefully very soon) we'll put handle_events(events: Vec<Event>)
in the same trait and then it will "handle" the background events. Can rename it for now, but hopefully we can migrate soon.
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.
Would it be worth re-naming the ChannelManagerPersister
trait then to be a little more generic? Happy to leave to a follow-up to bikeshed on. :)
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.
Yea, I was just figuring we'd leave it as a followup.
This avoids having to write new support for closures in the C bindings generation but, more importantly, we really need to also be handling Events in the same trait, so it makes sense to go ahead and convert it. For compatibility, the trait is implemented for any matching closure.
9f8c153
to
452b720
Compare
CM: 'static + Deref<Target = ChannelManager<Signer, M, T, K, F, L>> + Send + Sync, | ||
PM: 'static + Deref<Target = PeerManager<Descriptor, CMH, RMH, L>> + Send + Sync, | ||
> | ||
(handler: CMP, channel_manager: CM, peer_manager: PM, logger: L) -> Self |
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.
Would it be worth re-naming the ChannelManagerPersister
trait then to be a little more generic? Happy to leave to a follow-up to bikeshed on. :)
No description provided.