channedb/mp_payment: add Hash to individual HTLCs

For AMP payments the hash used for each HTLC will differ, and we will
need to retrive it after a restart. We therefore persist it with each
attempt.
This commit is contained in:
Johan T. Halseth committed 2021-04-27 09:44:19 +02:00
1 parent 41ae3530a3
commit 06f045fca3
4 files changed
+45 -2

No files matched your search

+7
View File
@@ -29,6 +29,13 @@ type HTLCAttemptInfo struct {
// AttemptTime is the time at which this HTLC was attempted.
AttemptTime time.Time
// Hash is the hash used for this single HTLC attempt. For AMP payments
// this will differ across attempts, for non-AMP payments each attempt
// will use the same hash. This can be nil for older payment attempts,
// in which the payment's PaymentHash in the PaymentCreationInfo should
// be used.
Hash *lntypes.Hash
}
// HTLCAttempt contains information about a specific HTLC attempt for a given