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 bd4f720..7ecc4e7 100644 --- a/service.go +++ b/service.go @@ -139,7 +139,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 }