channeldb+invoices: refactor invoice logic when updating

This commit is contained in:
eugene committed 2022-05-11 13:57:46 -04:00
1 parent c2adb03e38
commit 4eea395a7f
3 files changed
+70 -5

No files matched your search

+4
View File
@@ -227,6 +227,10 @@ func updateMpp(ctx *invoiceUpdateCtx,
return nil, ctx.failRes(ResultExpiryTooSoon), nil
}
if setID != nil && *setID == channeldb.BlankPayAddr {
return nil, ctx.failRes(ResultAmpError), nil
}
// Record HTLC in the invoice database.
newHtlcs := map[channeldb.CircuitKey]*channeldb.HtlcAcceptDesc{
ctx.circuitKey: acceptDesc,