htlcswitch+routing+routerrpc: error source as index and expose decrypt failure#3188
Merged
cfromknecht merged 7 commits intoJul 11, 2019
Merged
Conversation
0f8d9de to
8936a93
Compare
7a74e8b to
a10b382
Compare
6a4854a to
3f007d5
Compare
5ba8ff1 to
3408d85
Compare
halseth
reviewed
Jun 20, 2019
7e719c5 to
e24614e
Compare
Contributor
Author
|
@halseth ptal |
ed0767f to
59e021c
Compare
Roasbeef
requested changes
Jun 29, 2019
3b3fc2b to
cd36ba2
Compare
01cba8d to
2322a56
Compare
Contributor
Author
|
The itest |
cfromknecht
approved these changes
Jul 4, 2019
Contributor
cfromknecht
left a comment
There was a problem hiding this comment.
Latest version LGTM ✅
Roasbeef
reviewed
Jul 4, 2019
2322a56 to
cba6d3f
Compare
halseth
reviewed
Jul 8, 2019
Contributor
There was a problem hiding this comment.
can be initialized with the other vars
Contributor
Author
There was a problem hiding this comment.
Fixed, but not sure if it is an improvement.
cba6d3f to
ac70938
Compare
Contributor
Author
|
PR rebased after failure reason changes were merged in #3156 |
Merged
halseth
approved these changes
Jul 11, 2019
Contributor
There was a problem hiding this comment.
nit: take reference when var is declared instead
Contributor
Author
There was a problem hiding this comment.
Fixed. Also in the reflect.DeepEqual below, the same objects were compared.
24d88b9 to
41b1e7f
Compare
Methods on failure message types used to be defined on value receivers. This allowed assignment of a failure message to ForwardingError both as a value and as a pointer. This is error-prone, especially when using a type switch. In this commit the failure message methods are changed so that they target pointer receivers. Two instances where a value was assigned instead of a reference are fixed.
41b1e7f to
2726f50
Compare
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.
This PR modifies the switch behavior to return an integer indicating the error source instead of a pub key. This allows for a node occurring in the path multiple times. It also changes
routerrpc.SendToRouteto return the failure source as an integer.A second change introduces the
ErrUnreadableFailureresult for payments. This is a preparation for this case to be processed properly inrouter. Also an unknown failure (this is different from an unreadable failure) is now distinguishable.Builds onto lightningnetwork/lightning-onion#37
This PR prepares for persistent mission control #3164