-
Notifications
You must be signed in to change notification settings - Fork 407
Move short-to-chan-info
follow ups
#1795
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
Move short-to-chan-info
follow ups
#1795
Conversation
As the `channel_state` (`ChannelHolder`) struct will be removed, this commit moves the `short_to_chan_info` map from that lock into a seperate lock.
After lightningdevkit#1639 was merged, the `channel_state` lock is no longer an Option value in `claim_funds`. Update this PR to use the already unwrapped variable.
As the `short_to_chan_info` has been moved out of the `channel_state` to a standalone lock, several macros no longer need the `channel_state` passed into the macro.
As the `short_to_chan_info` map has been removed from the `channel_state`, there is no longer any consistency guarantees between the `by_id` and `short_to_chan_info` maps. This commit ensures that we don't force unwrap channels where the channel_id has been queried from the `short_to_chan_info` map.
Refactor `process_pending_htlc_forwards` to ensure that both branches that fails `pending_forwards` are placed next to eachother for improved readability.
Codecov ReportBase: 90.74% // Head: 90.70% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1795 +/- ##
==========================================
- Coverage 90.74% 90.70% -0.04%
==========================================
Files 87 87
Lines 47353 47348 -5
Branches 47353 47348 -5
==========================================
- Hits 42969 42947 -22
- Misses 4384 4401 +17
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. |
Closing this as the changes have now been included in #1639 once again. |
This PR is based on #1639 and moves some of the follow-ups from #1639 into a separate PR.
See comment #1639 (comment)
If you think it makes more sense to include these changes in #1639 instead, let me know and I'll close this PR.