channeldb+invoices: move hold invoice settle logic into registry

This commit is a continuation of the centralization of invoice state
transition logic in the invoice registry.
This commit is contained in:
Joost Jager
2019-08-21 15:24:21 +02:00
parent ad3522f1a6
commit 416bc8c68c
3 changed files with 37 additions and 84 deletions

View File

@@ -692,8 +692,9 @@ func getUpdateInvoice(amt lnwire.MilliSatoshi) InvoiceUpdateCallback {
}
update := &InvoiceUpdateDesc{
State: ContractSettled,
AmtPaid: amt,
Preimage: invoice.Terms.PaymentPreimage,
State: ContractSettled,
AmtPaid: amt,
}
return update, nil