mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +02:00
sqldb+invoices: add migration to fix incorrectly stored invoice expiries
Previously, when using the native schema, invoice expiries were incorrectly stored as 64-bit values (expiry in nanoseconds instead of seconds), causing overflow issues. Since we cannot determine the original values, we will set the expiries for existing invoices to 1 hour with this migration.
This commit is contained in:
@@ -69,7 +69,7 @@ func randInvoice(value lnwire.MilliSatoshi) (*invpkg.Invoice, error) {
|
||||
i := &invpkg.Invoice{
|
||||
CreationDate: testNow,
|
||||
Terms: invpkg.ContractTerm{
|
||||
Expiry: 4000,
|
||||
Expiry: time.Duration(4000) * time.Second,
|
||||
PaymentPreimage: &pre,
|
||||
PaymentAddr: payAddr,
|
||||
Value: value,
|
||||
|
Reference in New Issue
Block a user