invoices: optionally garbage collect invoices on the fly

This commit extends invoice garbage collection to also remove invoices
which are canceled when LND is already up and running. When the option
GcCanceledInvoicesOnTheFly is false (default) then invoices are kept and
the behavior is unchanged.
This commit is contained in:
Andras Banki-Horvath committed 2020-08-05 12:24:17 +02:00
1 parent a0d7877d9a
commit 2aa680ede2
4 files changed
+78 -8

No files matched your search

+1
View File
@@ -401,6 +401,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr, chanDB *channeldb.DB,
Clock: clock.NewDefaultClock(),
AcceptKeySend: cfg.AcceptKeySend,
GcCanceledInvoicesOnStartup: cfg.GcCanceledInvoicesOnStartup,
GcCanceledInvoicesOnTheFly: cfg.GcCanceledInvoicesOnTheFly,
KeysendHoldTime: cfg.KeysendHoldTime,
}