Skip to content

Commit 3d4ee8b

Browse files
committed
paymentsdb: rename defaultKVStoreOptions func
We rename the modifier to use the same naming as used in the graphDB to align the codebase.
1 parent 9d74ec4 commit 3d4ee8b

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

payments/db/kv_store.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,18 +133,11 @@ type KVStore struct {
133133
keepFailedPaymentAttempts bool
134134
}
135135

136-
// defaultKVStoreOptions returns the default options for the KV store.
137-
func defaultKVStoreOptions() *StoreOptions {
138-
return &StoreOptions{
139-
KeepFailedPaymentAttempts: false,
140-
}
141-
}
142-
143136
// NewKVStore creates a new KVStore for payments.
144137
func NewKVStore(db kvdb.Backend,
145138
options ...OptionModifier) (*KVStore, error) {
146139

147-
opts := defaultKVStoreOptions()
140+
opts := DefaultOptions()
148141
for _, applyOption := range options {
149142
applyOption(opts)
150143
}

payments/db/options.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ type StoreOptions struct {
1010
KeepFailedPaymentAttempts bool
1111
}
1212

13+
// DefaultOptions returns a StoreOptions populated with default values.
14+
func DefaultOptions() *StoreOptions {
15+
return &StoreOptions{
16+
KeepFailedPaymentAttempts: false,
17+
NoMigration: false,
18+
}
19+
}
20+
1321
// OptionModifier is a function signature for modifying the default
1422
// StoreOptions.
1523
type OptionModifier func(*StoreOptions)

0 commit comments

Comments
 (0)