Commit 24a7655
committed
htlcswitch: fix on-chain resolution error misclassification
This commit fixes a bug in `parseFailedPayment` where an on-chain
resolution with an empty reason was not being correctly identified
after being deserialized from disk by SubscribeResult or
GetResult. This impacts callers waiting for the final settle/fail
result on an htlc attempt via GetAttemptResult.
The lnwire codec transforms a `nil` reason into a non-nil, empty
byte slice and bypasses the existing check for `htlc.Reason == nil`.
Thankfully this does not crash the daemon. Rather, it just leads to
the caller (in our case, the ChannelRouter) not actually receiving
the expected FailPermanentChannelFailure link error.1 parent 3972403 commit 24a7655
2 files changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1090 | 1090 | | |
1091 | 1091 | | |
1092 | 1092 | | |
1093 | | - | |
| 1093 | + | |
1094 | 1094 | | |
1095 | 1095 | | |
1096 | 1096 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5608 | 5608 | | |
5609 | 5609 | | |
5610 | 5610 | | |
5611 | | - | |
5612 | | - | |
5613 | | - | |
| 5611 | + | |
| 5612 | + | |
| 5613 | + | |
| 5614 | + | |
5614 | 5615 | | |
5615 | 5616 | | |
5616 | 5617 | | |
| |||
0 commit comments