diff --git a/db.go b/db.go index e795ad7..b0aec17 100644 --- a/db.go +++ b/db.go @@ -42,7 +42,8 @@ func OpenDB(config *Config) (db *gorm.DB, err error) { type Invoice struct { gorm.Model - AddIndex uint64 + AddIndex uint64 + SettleIndex uint64 } type Payment struct { diff --git a/service.go b/service.go index 4e38cdd..145a4b2 100644 --- a/service.go +++ b/service.go @@ -140,7 +140,8 @@ func (svc *Service) lookupLastPaymentTimestamp(ctx context.Context) (lastPayment func (svc *Service) AddLastPublishedInvoice(ctx context.Context, invoice *lnrpc.Invoice) error { return svc.db.WithContext(ctx).Create(&Invoice{ - AddIndex: invoice.AddIndex, + AddIndex: invoice.AddIndex, + SettleIndex: invoice.SettleIndex, }).Error }