Skip to content

Make InvoicePayer's Router Deref #1960

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

tnull
Copy link
Contributor

@tnull tnull commented Jan 16, 2023

As of HEAD the ChannelManager is parametrized by a Deref Router, while InvoicePayer also owns a Router. In order to allow for a single object being reused, we make the InvoicePayer side Deref.

Note that InvoicePayer will be removed anyways soon, but this change should make it easier to work off HEAD until then.

As of HEAD the `ChannelManager` is parametrized by a `Router`, while
`InvoicePayer` also owns a `Router`. In order to allow for a single
object being reused, we make the `InvoicePayer` side `Deref`.
@codecov-commenter
Copy link

codecov-commenter commented Jan 16, 2023

Codecov Report

Base: 90.72% // Head: 90.72% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (bc8e1e5) compared to base (ce6bcf6).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1960      +/-   ##
==========================================
- Coverage   90.72%   90.72%   -0.01%     
==========================================
  Files          97       97              
  Lines       50579    50579              
  Branches    50579    50579              
==========================================
- Hits        45888    45887       -1     
- Misses       4691     4692       +1     
Impacted Files Coverage Δ
lightning-background-processor/src/lib.rs 95.45% <100.00%> (ø)
lightning-invoice/src/payment.rs 89.63% <100.00%> (+0.15%) ⬆️
lightning/src/chain/channelmonitor.rs 90.93% <0.00%> (-0.15%) ⬇️
lightning/src/ln/channelmanager.rs 87.10% <0.00%> (-0.03%) ⬇️
lightning/src/ln/functional_tests.rs 97.03% <0.00%> (ø)
lightning/src/util/events.rs 30.73% <0.00%> (+0.22%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with me. Up to @valentinewallace if she wants to eat the conflicts on this one or if we want to land #1916 first and then you can stop using InvoicePayer downstream immediately (maybe? or landing that PR quickly as well)

@tnull
Copy link
Contributor Author

tnull commented Jan 16, 2023

Fine with me. Up to @valentinewallace if she wants to eat the conflicts on this one or if we want to land #1916 first and then you can stop using InvoicePayer downstream immediately (maybe? or landing that PR quickly as well)

Val also told me that we could just give a dummy Router to the CM for the time being. If this really generates quite a few conflicts, I'm happy to close this PR and do that.

Copy link
Contributor

@arik-so arik-so left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@valentinewallace valentinewallace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't see any conflicts with #1916, LGTM!

@TheBlueMatt TheBlueMatt merged commit e1b58a8 into lightningdevkit:main Jan 17, 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