Commit Graph

11 Commits

Author SHA1 Message Date
Marko 617b822efa
types: add kv type (#6897)
* add kv type

* add changelog entry

* fix build

* replace sdkkv with kv

* revert change

* fix some tests

* proto-gen

* fix tests

Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-30 14:53:02 +00:00
Alessio Treglia e0d029388d
fix DiffKVStores(), store/types gets 100% coverage (#5730)
* fix DiffKVStores(), store/types gets 100% coverage

DiffKVStores() used to return duplicated entries
in some cases.

Add test cases, aiming to reach 100% coverage for
store package.

Remove duplicate Cp function from the store package.
Same functionality is provided by types.CopyBytes().

* More test cases

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-03-02 00:27:03 +00:00
Alexander Bezobchuk c1991e31bd Merge PR #5527: Bump Tendermint Version to v0.33.0
* Bump Tendermint version to v0.33.0

* Deprecate old cmn package with new packages

* Update update DB APIs

* More DB updates

* Bump IAVL to v0.13.0

* Handle error returned by iavl.NewMutableTree

* Fix some IAVL stuffs

* Update IAVL

* More updates

* Passing tests

* Fix unit tests

Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
2020-01-16 13:46:51 -08:00
Joon 08e62fb157 Store Refactor 1 (#2985) 2019-02-01 17:03:09 -08:00
Christopher Goes 17983460b8
Merge PR #2219: Update to Tendermint 0.24 (except NextValSet offsets) 2018-10-03 17:48:23 +02:00
Ethan Buchman f78f30c67a update for tm v0.22.0. tmlibs->tendermint/libs 2018-07-02 16:34:06 -04:00
rigelrozanski d28efaac27 many renames / golint compliance 2018-04-19 00:49:24 -04:00
Jae Kwon 6f9a08d921 Conform to new tmlibs Iterator 2017-12-21 03:44:04 -08:00
Ethan Buchman 72b0ed004b wip: tests and fixes for kvstore iteration 2017-12-21 03:31:33 -08:00
Jae Kwon eb1f877d3d
KVStore refactor (#303)
I removed that stuff about cwwMutex and CacheWraps expiring. It was unnecessary complexity given that users need not write concurrent logic. If you have 2 CacheKVStores and you Write on one and later you Write on the other one, they will both write, and strange things may happen. But that’s OK, it’s kinda the expected (unsurprising) behavior. And now the code is much simpler.

Also I got rid of IterKVStore. It’s not necessary to distinguish them because we can have KVStore.Iterator() return nil or panic or an empty iterator. Further simplification…

KVStore.CacheKVStore() doesn’t exist. No need, just call NewCacheKVStore(parent).

Originally I wanted the .CacheKVStore() method because you can make the implementor be responsible for ensuring that returned CacheWraps don’t trample each other. But as written previously this complicates the code a lot more and it isn’t strictly necessary. It’s a kind of magic that maybe should just be avoided.

sdk.Iterator is dbm.Iterator. The plan is to conservatively add more aliases into the “sdk” namespace.

GetError() is removed from Iterator. We need to just panic to be consistent. More simplification.
2017-12-12 20:13:51 -08:00
Jae Kwon af7a621440
cacheMergeIterator (#298) 2017-12-11 23:30:44 -08:00