-
Notifications
You must be signed in to change notification settings - Fork 385
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
Prepare for Payment Retries in ChannelManager
#1862
Prepare for Payment Retries in ChannelManager
#1862
Conversation
After we sort out whether to make |
Codecov ReportBase: 90.72% // Head: 91.02% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1862 +/- ##
==========================================
+ Coverage 90.72% 91.02% +0.30%
==========================================
Files 91 91
Lines 47896 49984 +2088
Branches 47896 49984 +2088
==========================================
+ Hits 43453 45499 +2046
- Misses 4443 4485 +42
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. |
94fcf48
to
ea0c8cb
Compare
e38cd12
to
59510b9
Compare
Hmm, is there some way to retain the |
For sure, how about an additional |
That seems reasonable to me. |
59510b9
to
45cca60
Compare
45cca60
to
70ca0d4
Compare
Feel free to squash, IMO. |
This helps us prepare to move all payment retries into ChannelManager, which is needed for trampoline payments.
70ca0d4
to
3f53951
Compare
We move it to router instead of scoring because it pairs with the InFlightHtlcs struct in router and is useful for custom Router trait implementations
3f53951
to
8a51a79
Compare
use bitcoin_hashes::sha256::Hash as Sha256; | ||
use lightning::ln::PaymentPreimage; | ||
use lightning::ln::channelmanager; | ||
use lightning::ln::features::{ChannelFeatures, NodeFeatures}; | ||
use lightning::ln::functional_test_utils::*; | ||
use lightning::ln::msgs::{ChannelMessageHandler, ErrorAction, LightningError}; | ||
use lightning::routing::gossip::{EffectiveCapacity, NodeId}; | ||
use lightning::routing::router::{InFlightHtlcs, PaymentParameters, Route, RouteHop, Router}; | ||
use lightning::routing::router::{InFlightHtlcs, PaymentParameters, Route, RouteHop, Router, ScorerAccountingForInFlightHtlcs}; |
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.
It's a little strange that we test ScorerAccountingForInFlightHtlcs
in this crate still in considers_inflight_htlcs_between_retries
. Probably should move the test.
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.
Could we save that since all of the tests are going to be moving soon?
Just code moves that help us prepare for getting rid of the
InvoicePayer
and moving payment retries intoChannelManager
, in preparation for trampoline payments.