-
Notifications
You must be signed in to change notification settings - Fork 405
Pre-refactor for HTLC Interception #1840
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
Pre-refactor for HTLC Interception #1840
Conversation
Codecov ReportBase: 90.77% // Head: 90.81% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1840 +/- ##
==========================================
+ Coverage 90.77% 90.81% +0.04%
==========================================
Files 87 87
Lines 47595 47727 +132
Branches 47595 47727 +132
==========================================
+ Hits 43204 43345 +141
+ Misses 4391 4382 -9
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. |
In upcoming commit(s), we'll want to store intercepted HTLC forwards in ChannelManager before the user signals that they should be forwarded. It wouldn't make sense to store a HTLCForwardInfo as-is because the FailHTLC variant doesn't make sense, so we refactor out the ::AddHTLC contents into its own struct for storage. Co-authored-by: John Cantrell <[email protected]> Co-authored-by: Valentine Wallace <[email protected]>
Only whitespace diff
Used in upcoming commit(s) when we generate the PaymentIntercepted event for intercepted payments. Co-authored-by: John Cantrell <[email protected]> Co-authored-by: Valentine Wallace <[email protected]>
cargo bench was able to find an scid of 0 as a valid fake scid
3114857
to
c793549
Compare
@@ -2194,6 +2197,7 @@ impl<M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelManager<M, T, K, F | |||
routing, | |||
payment_hash, | |||
incoming_shared_secret: shared_secret, | |||
amt_incoming: Some(amt_msat), |
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.
In a followup, lets rename this incoming_amt_msat
and the following to_forward_amt_msat
or just some ther names with msat
in them.
Clears the path for #1835 to have a smaller changeset there.
If we want, I can also pull in bcac847 which tracks pending intercepts in
ChannelManager
(though none will be tracked until 1835).