diff --git a/x/accounts/internal/prefixstore/prefixstore.go b/x/accounts/internal/prefixstore/prefixstore.go index 3121691a25df..ef84b70703d0 100644 --- a/x/accounts/internal/prefixstore/prefixstore.go +++ b/x/accounts/internal/prefixstore/prefixstore.go @@ -21,7 +21,7 @@ func New(store store.KVStore, prefix []byte) store.KVStore { var _ store.KVStore = Store{} -// Store is similar with cometbft/cometbft/libs/db/prefix_db +// Store is similar with cometbft/cometbft-db/blob/v1.0.1/prefixdb.go // both gives access only to the limited subset of the store // for convenience or safety type Store struct { @@ -63,7 +63,7 @@ func (s Store) Set(key, value []byte) error { func (s Store) Delete(key []byte) error { return s.parent.Delete(s.key(key)) } // Implements KVStore -// Check https://github.com/cometbft/cometbft/blob/master/libs/db/prefix_db.go#L106 +// Check https://github.com/cometbft/cometbft-db/blob/v1.0.1/prefixdb.go#L109 func (s Store) Iterator(start, end []byte) (store.Iterator, error) { newstart := cloneAppend(s.prefix, start) @@ -83,7 +83,7 @@ func (s Store) Iterator(start, end []byte) (store.Iterator, error) { } // ReverseIterator implements KVStore -// Check https://github.com/cometbft/cometbft/blob/master/libs/db/prefix_db.go#L129 +// Check https://github.com/cometbft/cometbft-db/blob/v1.0.1/prefixdb.go#L132 func (s Store) ReverseIterator(start, end []byte) (store.Iterator, error) { newstart := cloneAppend(s.prefix, start) @@ -180,7 +180,7 @@ func (pi *prefixIterator) Error() error { return nil } -// copied from github.com/cometbft/cometbft/libs/db/prefix_db.go +// copied from github.com/cometbft/cometbft-db/blob/v1.0.1/prefixdb.go func stripPrefix(key, prefix []byte) []byte { if len(key) < len(prefix) || !bytes.Equal(key[:len(prefix)], prefix) { panic("should not happen") diff --git a/x/group/internal/orm/prefixstore/prefixstore.go b/x/group/internal/orm/prefixstore/prefixstore.go index 5ac697756260..a121baf464d6 100644 --- a/x/group/internal/orm/prefixstore/prefixstore.go +++ b/x/group/internal/orm/prefixstore/prefixstore.go @@ -21,7 +21,7 @@ func New(store store.KVStore, prefix []byte) store.KVStore { var _ store.KVStore = Store{} -// Store is similar with cometbft/cometbft/libs/db/prefix_db +// Store is similar with cometbft/cometbft-db/blob/v1.0.1/prefixdb.go // both gives access only to the limited subset of the store // for convenience or safety type Store struct { @@ -63,7 +63,7 @@ func (s Store) Set(key, value []byte) error { func (s Store) Delete(key []byte) error { return s.parent.Delete(s.key(key)) } // Implements KVStore -// Check https://github.com/cometbft/cometbft/blob/master/libs/db/prefix_db.go#L106 +// Check https://github.com/cometbft/cometbft-db/blob/v1.0.1/prefixdb.go#L109 func (s Store) Iterator(start, end []byte) (store.Iterator, error) { newstart := cloneAppend(s.prefix, start) @@ -83,7 +83,7 @@ func (s Store) Iterator(start, end []byte) (store.Iterator, error) { } // ReverseIterator implements KVStore -// Check https://github.com/cometbft/cometbft/blob/master/libs/db/prefix_db.go#L129 +// Check https://github.com/cometbft/cometbft-db/blob/v1.0.1/prefixdb.go#L132 func (s Store) ReverseIterator(start, end []byte) (store.Iterator, error) { newstart := cloneAppend(s.prefix, start) @@ -180,7 +180,7 @@ func (pi *prefixIterator) Error() error { return nil } -// copied from github.com/cometbft/cometbft/libs/db/prefix_db.go +// copied from github.com/cometbft/cometbft-db/blob/v1.0.1/prefixdb.go func stripPrefix(key, prefix []byte) []byte { if len(key) < len(prefix) || !bytes.Equal(key[:len(prefix)], prefix) { panic("should not happen")