feat(core/store): make KVStore structurally typed (#21222)

This commit is contained in:
Aaron Craelius 2024-08-08 09:14:59 -04:00 committed by GitHub
parent 849bccc02a
commit dccdd5daba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -55,6 +55,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* Add `PreMsghandler`and `PostMsgHandler` for pre and post message hooks
* Add `MsgHandler` as an alternative to grpc handlers
* Provide separate `MigrationRegistrar` instead of grouping with `RegisterServices`
* [#21222](https://github.com/cosmos/cosmos-sdk/pull/21222) Make `Iterator` a type alias so that `KVStore` is structurally typed.
### API Breaking Changes

View File

@ -87,7 +87,7 @@ type KVStoreWithBatch interface {
//
// Callers must make sure the iterator is valid before calling any methods on it,
// otherwise these methods will panic.
type Iterator interface {
type Iterator = interface {
// Domain returns the start (inclusive) and end (exclusive) limits of the iterator.
Domain() (start, end []byte)