Skip to content

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

Merged
merged 3 commits into from
Apr 15, 2021

Conversation

TheBlueMatt
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Apr 14, 2021

Codecov Report

Merging #884 (452b720) into main (feeb893) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
lightning-background-processor/src/lib.rs 96.11% <100.00%> (ø)
lightning/src/ln/functional_tests.rs 96.88% <0.00%> (-0.18%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update feeb893...452b720. Read the comment docs.

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
Copy link
Contributor

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

Copy link
Collaborator Author

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.

Copy link
Contributor

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. :)

Copy link
Collaborator Author

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.
@TheBlueMatt TheBlueMatt force-pushed the 2021-04-bp-bindings branch from 9f8c153 to 452b720 Compare April 15, 2021 19:23
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
Copy link
Contributor

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. :)

@TheBlueMatt TheBlueMatt merged commit 2213f24 into lightningdevkit:main Apr 15, 2021
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.

3 participants