Add assertions to clarify our assumptions about msg != NULL#1032
Merged
cdecker merged 1 commit intoFeb 19, 2018
Conversation
ZmnSCPxj
suggested changes
Feb 19, 2018
Contributor
ZmnSCPxj
left a comment
There was a problem hiding this comment.
All possible values of r->errorcode are handled in both switch statements, and all switch cases load some value to data and msg.
Also, a NULL data is allowed by command_fail_detailed: this is for the case where the error has no data it can return. For PAY_IN_PROGRESS and PAY_RHASH_ALREADY_USED for example.
Maybe an assert(msg) would be sufficient.
Contributor
Author
|
@ZmnSCPxj Thanks for your quick clarification. Updated accordingly. Please review :-) |
Contributor
|
ACK ad3a1ee |
ZmnSCPxj
approved these changes
Feb 19, 2018
Contributor
Author
|
@ZmnSCPxj Sorry was a bit too quick. Would you mind re-reviewing? :-) |
ZmnSCPxj
approved these changes
Feb 19, 2018
Contributor
|
ACK 4a9e26c |
Member
|
Thanks @practicalswift for the PR and thanks @ZmnSCPxj for the super fast review round :-) |
rustyrussell
added a commit
to rustyrussell/lightning
that referenced
this pull request
Apr 1, 2023
"Allow nodes to overshoot final htlc amount and expiry (ElementsProject#1032)" Note that this also renamed `min_final_cltv_expiry` to the more-correct `min_final_cltv_expiry_delta`. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
rustyrussell
added a commit
to rustyrussell/lightning
that referenced
this pull request
Apr 7, 2023
"Allow nodes to overshoot final htlc amount and expiry (ElementsProject#1032)" Note that this also renamed `min_final_cltv_expiry` to the more-correct `min_final_cltv_expiry_delta`. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
rustyrussell
added a commit
that referenced
this pull request
Apr 7, 2023
"Allow nodes to overshoot final htlc amount and expiry (#1032)" Note that this also renamed `min_final_cltv_expiry` to the more-correct `min_final_cltv_expiry_delta`. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
itme-brain
pushed a commit
to itme-brain/lightning
that referenced
this pull request
Apr 7, 2023
"Allow nodes to overshoot final htlc amount and expiry (ElementsProject#1032)" Note that this also renamed `min_final_cltv_expiry` to the more-correct `min_final_cltv_expiry_delta`. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ddustin
pushed a commit
to ddustin/lightning
that referenced
this pull request
Apr 11, 2023
"Allow nodes to overshoot final htlc amount and expiry (ElementsProject#1032)" Note that this also renamed `min_final_cltv_expiry` to the more-correct `min_final_cltv_expiry_delta`. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
gkrizek
pushed a commit
to voltagecloud/lightning
that referenced
this pull request
Apr 26, 2023
"Allow nodes to overshoot final htlc amount and expiry (ElementsProject#1032)" Note that this also renamed `min_final_cltv_expiry` to the more-correct `min_final_cltv_expiry_delta`. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ddustin
pushed a commit
to ddustin/lightning
that referenced
this pull request
May 12, 2023
"Allow nodes to overshoot final htlc amount and expiry (ElementsProject#1032)" Note that this also renamed `min_final_cltv_expiry` to the more-correct `min_final_cltv_expiry_delta`. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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.
Avoid using uninitialized values when calling
command_fail_detailed(...).