-
Notifications
You must be signed in to change notification settings - Fork 421
Pass counterparty_node_id to fail_holding_cell_htlcs
#1524
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
Pass counterparty_node_id to fail_holding_cell_htlcs
#1524
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1524 +/- ##
==========================================
- Coverage 90.93% 90.88% -0.05%
==========================================
Files 80 80
Lines 43386 43375 -11
Branches 43386 43375 -11
==========================================
- Hits 39451 39422 -29
- Misses 3935 3953 +18
Continue to review full report at Codecov.
|
tnull
left a comment
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.
LGTM, only two tiny formatting nits.
lightning/src/ln/channelmanager.rs
Outdated
| // failed backwards or, if they were one of our outgoing HTLCs, then their failure needs to | ||
| // be surfaced to the user. | ||
| fn fail_holding_cell_htlcs(&self, mut htlcs_to_fail: Vec<(HTLCSource, PaymentHash)>, channel_id: [u8; 32]) { | ||
| fn fail_holding_cell_htlcs(&self, mut htlcs_to_fail: Vec<(HTLCSource, PaymentHash)>, channel_id: [u8; 32], _counterparty_node_id: &PublicKey) { |
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.
nit: you probably should wrap this line at 100 characters width.
lightning/src/ln/channelmanager.rs
Outdated
| Ok((commitment_opt, holding_cell_failed_htlcs)) => { | ||
| if !holding_cell_failed_htlcs.is_empty() { | ||
| failed_htlcs.push((holding_cell_failed_htlcs, *channel_id)); | ||
| failed_htlcs.push((holding_cell_failed_htlcs, *channel_id, chan.get_counterparty_node_id())); |
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.
nit: same here: wrap at 100 chars.
Yeah, I think we currently follow the policy to slowly improve the quality and formatting in parts we touch. Hopefully, though, we may be able to adopt |
cd59bc8 to
6032a56
Compare
Ok great thanks :)! Squashed the line wrapping fixup without changes. |
Both #1507 and #1403 needs the
counterparty_node_idto be passed toChannelManager::fail_holding_cell_htlcs. This PR simply passes the parameter to the function, so that both PRs can be based on this.