mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-19 03:57:40 +02:00
invoices: ensure AMP subinvoices are correctly updated w/nativesql
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
8c6e24346a
commit
cadce23b47
@@ -1283,6 +1283,13 @@ func (s *sqlInvoiceUpdater) UpdateAmpState(setID [32]byte,
|
||||
return err
|
||||
}
|
||||
|
||||
if settleIndex.Valid {
|
||||
updatedState := s.invoice.AMPState[setID]
|
||||
updatedState.SettleIndex = uint64(settleIndex.Int64)
|
||||
updatedState.SettleDate = s.updateTime.UTC()
|
||||
s.invoice.AMPState[setID] = updatedState
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user