lightningnetwork / lightning-onion

Onion Routed Micropayments for the Lightning Network
MIT License
398 stars 127 forks source link

sphinx: return error source as integer #37

Closed joostjager closed 5 years ago

joostjager commented 5 years ago

Returning as an integer allows a node to occur in the payment path multiple times.

joostjager commented 5 years ago

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.

joostjager commented 5 years ago

@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.

joostjager commented 5 years ago

@Roasbeef ptal