multi: move failed attempt cfg option to the router subsytem
Previously we had db and application logic mixed on the db level. We now move the config option KeepFailedPaymentAttempts to the ChannelRouter level and move it out of the db level.
This commit is contained in:
10 files changed
+224
-175
No files matched your search
@@ -1236,9 +1236,6 @@ func (d *DefaultDatabaseBuilder) BuildDatabase(
|
||||
// will build a SQL payments backend.
|
||||
sqlPaymentsDB, err := d.getPaymentsStore(
|
||||
baseDB, dbs.ChanStateDB.Backend,
|
||||
paymentsdb.WithKeepFailedPaymentAttempts(
|
||||
cfg.KeepFailedPaymentAttempts,
|
||||
),
|
||||
)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("unable to get payments store: %w",
|
||||
@@ -1280,9 +1277,6 @@ func (d *DefaultDatabaseBuilder) BuildDatabase(
|
||||
// Create the payments DB.
|
||||
kvPaymentsDB, err := paymentsdb.NewKVStore(
|
||||
dbs.ChanStateDB,
|
||||
paymentsdb.WithKeepFailedPaymentAttempts(
|
||||
cfg.KeepFailedPaymentAttempts,
|
||||
),
|
||||
)
|
||||
if err != nil {
|
||||
cleanUp()
|
||||
|
||||
Reference in new issue
Block a user