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>
This commit is contained in:
Alexander Bezobchuk
2020-01-16 13:46:51 -08:00
committed by Jack Zampolin
co-authored by Jack Zampolin
parent c92a7389ff
commit c1991e31bd
88 changed files with 577 additions and 344 deletions
+9 -3
View File
@@ -18,7 +18,9 @@ func TestGetOrSetStoreCache(t *testing.T) {
mngr := cache.NewCommitKVStoreCacheManager(cache.DefaultCommitKVStoreCacheSize)
sKey := types.NewKVStoreKey("test")
store := iavlstore.UnsafeNewStore(iavl.NewMutableTree(db, 100), 10, 10)
tree, err := iavl.NewMutableTree(db, 100)
require.NoError(t, err)
store := iavlstore.UnsafeNewStore(tree, 10, 10)
store2 := mngr.GetStoreCache(sKey, store)
require.NotNil(t, store2)
@@ -30,7 +32,9 @@ func TestUnwrap(t *testing.T) {
mngr := cache.NewCommitKVStoreCacheManager(cache.DefaultCommitKVStoreCacheSize)
sKey := types.NewKVStoreKey("test")
store := iavlstore.UnsafeNewStore(iavl.NewMutableTree(db, 100), 10, 10)
tree, err := iavl.NewMutableTree(db, 100)
require.NoError(t, err)
store := iavlstore.UnsafeNewStore(tree, 10, 10)
_ = mngr.GetStoreCache(sKey, store)
require.Equal(t, store, mngr.Unwrap(sKey))
@@ -42,7 +46,9 @@ func TestStoreCache(t *testing.T) {
mngr := cache.NewCommitKVStoreCacheManager(cache.DefaultCommitKVStoreCacheSize)
sKey := types.NewKVStoreKey("test")
store := iavlstore.UnsafeNewStore(iavl.NewMutableTree(db, 100), 10, 10)
tree, err := iavl.NewMutableTree(db, 100)
require.NoError(t, err)
store := iavlstore.UnsafeNewStore(tree, 10, 10)
kvStore := mngr.GetStoreCache(sKey, store)
for i := uint(0); i < cache.DefaultCommitKVStoreCacheSize*2; i++ {