Commit ce1a4c1
committed
lndclient: add FailureMessage and FailureCode to InterceptedHtlcResponse
The HTLC interception response type was missing fields for controlling
how lnd encodes failure errors back to the sender. Without these fields,
all interceptor failures are encoded as TemporaryChannelFailure and
attributed to the intercepting node, which causes Mission Control to
penalize the forwarding pair.
This adds FailureMessage and FailureCode to InterceptedHtlcResponse and
wires them through rpcInterceptorResponse. FailureMessage accepts a
pre-encrypted onion error blob that lnd relays via IntermediateEncrypt,
preserving the error attribution of the original encrypter. This is the
path a virtual node behind the interceptor uses to produce errors
attributed to itself rather than the intercepting node. FailureCode
selects a specific failure code for errors attributed to the interceptor.1 parent f483132 commit ce1a4c1
1 file changed
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
398 | 411 | | |
399 | 412 | | |
400 | 413 | | |
| |||
955 | 968 | | |
956 | 969 | | |
957 | 970 | | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
958 | 987 | | |
959 | 988 | | |
960 | 989 | | |
| |||
0 commit comments