mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 14:40:30 +01:00
lnrpc: surface invalid onion blinding on rpc
This commit is contained in:
parent
fd8381bf2a
commit
d017fe01e3
5 changed files with 575 additions and 563 deletions
File diff suppressed because it is too large
Load diff
|
@ -4598,6 +4598,7 @@ message Failure {
|
|||
EXPIRY_TOO_FAR = 22;
|
||||
MPP_TIMEOUT = 23;
|
||||
INVALID_ONION_PAYLOAD = 24;
|
||||
INVALID_ONION_BLINDING = 25;
|
||||
|
||||
/*
|
||||
An internal error occurred.
|
||||
|
|
|
@ -2849,6 +2849,7 @@
|
|||
"EXPIRY_TOO_FAR",
|
||||
"MPP_TIMEOUT",
|
||||
"INVALID_ONION_PAYLOAD",
|
||||
"INVALID_ONION_BLINDING",
|
||||
"INTERNAL_FAILURE",
|
||||
"UNKNOWN_FAILURE",
|
||||
"UNREADABLE_FAILURE"
|
||||
|
|
|
@ -577,6 +577,7 @@
|
|||
"EXPIRY_TOO_FAR",
|
||||
"MPP_TIMEOUT",
|
||||
"INVALID_ONION_PAYLOAD",
|
||||
"INVALID_ONION_BLINDING",
|
||||
"INTERNAL_FAILURE",
|
||||
"UNKNOWN_FAILURE",
|
||||
"UNREADABLE_FAILURE"
|
||||
|
|
|
@ -1495,6 +1495,10 @@ func marshallWireError(msg lnwire.FailureMessage,
|
|||
case *lnwire.InvalidOnionPayload:
|
||||
response.Code = lnrpc.Failure_INVALID_ONION_PAYLOAD
|
||||
|
||||
case *lnwire.FailInvalidBlinding:
|
||||
response.Code = lnrpc.Failure_INVALID_ONION_BLINDING
|
||||
response.OnionSha_256 = onionErr.OnionSHA256[:]
|
||||
|
||||
case nil:
|
||||
response.Code = lnrpc.Failure_UNKNOWN_FAILURE
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue