Improve ChannelDetails readability significantly.#988
Merged
TheBlueMatt merged 1 commit intolightningdevkit:mainfrom Jul 8, 2021
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## main #988 +/- ##
==========================================
- Coverage 90.73% 90.72% -0.02%
==========================================
Files 60 60
Lines 30702 30656 -46
==========================================
- Hits 27857 27812 -45
+ Misses 2845 2844 -1
Continue to review full report at Codecov.
|
jkczyz
approved these changes
Jul 7, 2021
Contributor
jkczyz
left a comment
There was a problem hiding this comment.
Thanks for making this change!
valentinewallace
approved these changes
Jul 8, 2021
After the merge of lightningdevkit#984, Jeff pointed out that `ChannelDetails` has become a bit of a "bag of variables", and that a few of the variable names in lightningdevkit#984 were more confusing than necessary in context. This addresses several issues by: * Splitting counterparty parameters into a separate `ChannelCounterpartyParameters` struct, * using the name `unspendable_punishment_reserve` for both outbound and inbound channel reserves, differentiating them based on their position in the counterparty parameters struct or not, * Using the name `force_close_spend_delay` instead of `spend_csv_on_our_commitment_funds` to better communicate what is occurring.
ceca6f4 to
2b08a47
Compare
Collaborator
Author
|
Squashed with no changes, only changes since Jeff's ACK are below. Will merge after CI. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After the merge of #984, Jeff pointed out that
ChannelDetailshasbecome a bit of a "bag of variables", and that a few of the variable
names in #984 were more confusing than necessary in context.
This addresses several issues by:
ChannelCounterpartyParametersstruct,unspendable_punishment_reservefor both outboundand inbound channel reserves, differentiating them based on their
position in the counterparty parameters struct or not,
force_close_spend_delayinstead ofspend_csv_on_our_commitment_fundsto better communicate whatis occurring.