-
Notifications
You must be signed in to change notification settings - Fork 125
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
sphinx: return error source as integer #37
Conversation
991dab9
to
cd516f6
Compare
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.
How is this better than just using the pubkey as is? If they appear multiple times in the path, then they'll be present multiple times in the payment path's circuit.
The sender doesn't know whether the failure happened on the first or the second visit of that node. |
4e4a958
to
ad3ab31
Compare
@Roasbeef fixup pushed that adds return struct. I still don't think it is good, for the reasons pointed out above. But it is a small change and the most important thing is to expose the index one way or the other. |
@Roasbeef ptal |
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 🧬
Returning as an integer allows a node to occur in the payment path multiple times.
ad3ab31
to
7d1f799
Compare
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, nice change! ✅
obfuscation_test.go
Outdated
if err != nil { | ||
t.Fatalf("unable to de-obfuscate the onion failure: %v", err) | ||
} | ||
|
||
// We should understand the node from which error have been received. | ||
if !bytes.Equal(pubKey.SerializeCompressed(), | ||
errorPath[len(errorPath)-1].SerializeCompressed()) { | ||
if source != len(errorPath) { |
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.
definitely makes these comparisons simpler 👍
Returning as an integer allows a node to occur in the payment path
multiple times.