routing: fail attempt when no shard is found or circuit generation fails

This commit is contained in:
yyforyongyu
2023-03-07 18:58:48 +08:00
parent eda24ec871
commit 09a5d235ec
2 changed files with 25 additions and 2 deletions

View File

@@ -1000,6 +1000,8 @@ func (s *Switch) extractResult(deobfuscator ErrorDecrypter, n *networkResult,
// We've received a fail update which means we can finalize the
// user payment and return fail response.
case *lnwire.UpdateFailHTLC:
// TODO(yy): construct deobfuscator here to avoid creating it
// in paymentLifecycle even for settled HTLCs.
paymentErr := s.parseFailedPayment(
deobfuscator, attemptID, paymentHash, n.unencrypted,
n.isResolution, htlc,