Skip to content

Commit 0320dfc

Browse files
committed
paymentsdb: add compile time check for the kv db implementation
1 parent 3d4ee8b commit 0320dfc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

payments/db/kv_store.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ type KVStore struct {
133133
keepFailedPaymentAttempts bool
134134
}
135135

136+
// A compile-time constraint to ensure KVStore implements DB.
137+
var _ DB = (*KVStore)(nil)
138+
136139
// NewKVStore creates a new KVStore for payments.
137140
func NewKVStore(db kvdb.Backend,
138141
options ...OptionModifier) (*KVStore, error) {

0 commit comments

Comments
 (0)