chore: add errors to iterator creation (#14635)
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<!--
|
||||
Guiding Principles:
|
||||
|
||||
Changelogs are for humans, not machines.
|
||||
There should be an entry for every single version.
|
||||
The same types of changes should be grouped.
|
||||
Versions and sections should be linkable.
|
||||
The latest version comes first.
|
||||
The release date of each version is displayed.
|
||||
Mention whether you follow Semantic Versioning.
|
||||
|
||||
Usage:
|
||||
|
||||
Change log entries are to be added to the Unreleased section under the
|
||||
appropriate stanza (see below). Each entry should ideally include a tag and
|
||||
the Github issue reference in the following format:
|
||||
|
||||
* (<tag>) \#<issue-number> message
|
||||
|
||||
The issue numbers will later be link-ified during the release process so you do
|
||||
not have to worry about including a link manually, but you can if you wish.
|
||||
|
||||
Types of changes (Stanzas):
|
||||
|
||||
"Features" for new features.
|
||||
"Improvements" for changes in existing functionality.
|
||||
"Deprecated" for soon-to-be removed features.
|
||||
"Bug Fixes" for any bug fixes.
|
||||
"Client Breaking" for breaking Protobuf, gRPC and REST routes used by end-users.
|
||||
"CLI Breaking" for breaking CLI commands.
|
||||
"API Breaking" for breaking exported APIs used by developers building on SDK.
|
||||
Ref: https://keepachangelog.com/en/1.0.0/
|
||||
-->
|
||||
|
||||
# Changelog
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### API-Breaking Changes
|
||||
|
||||
- (store)[14635](https://github.com/cosmos/cosmos-sdk/pull/14635) Add error handling to all methods on the `KVStore` interface
|
||||
+2
-2
@@ -22,14 +22,14 @@ type KVStore interface {
|
||||
// To iterate over entire domain, use store.Iterator(nil, nil)
|
||||
// CONTRACT: No writes may happen within a domain while an iterator exists over it.
|
||||
// Exceptionally allowed for cachekv.Store, safe to write in the modules.
|
||||
Iterator(start, end []byte) Iterator
|
||||
Iterator(start, end []byte) (Iterator, error)
|
||||
|
||||
// ReverseIterator iterates over a domain of keys in descending order. End is exclusive.
|
||||
// Start must be less than end, or the Iterator is invalid.
|
||||
// Iterator must be closed by caller.
|
||||
// CONTRACT: No writes may happen within a domain while an iterator exists over it.
|
||||
// Exceptionally allowed for cachekv.Store, safe to write in the modules.
|
||||
ReverseIterator(start, end []byte) Iterator
|
||||
ReverseIterator(start, end []byte) (Iterator, error)
|
||||
}
|
||||
|
||||
// Iterator is an alias db's Iterator for convenience.
|
||||
|
||||
Reference in New Issue
Block a user