diff --git a/proto/cosmos/base/store/v1beta1/commit_info.proto b/proto/cosmos/base/store/v1beta1/commit_info.proto index ce300b7913ff..86e7ddb5b79f 100644 --- a/proto/cosmos/base/store/v1beta1/commit_info.proto +++ b/proto/cosmos/base/store/v1beta1/commit_info.proto @@ -9,15 +9,18 @@ option go_package = "github.com/cosmos/cosmos-sdk/store/types"; // CommitInfo defines commit information used by the multi-store when committing // a version/height. message CommitInfo { - int64 version = 1; - repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false]; - google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + int64 version = 1; + repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false]; + google.protobuf.Timestamp timestamp = 3 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; } // StoreInfo defines store-specific commit information. It contains a reference // between a store name and the commit ID. message StoreInfo { - string name = 1; + string name = 1; CommitID commit_id = 2 [(gogoproto.nullable) = false]; } @@ -27,5 +30,5 @@ message CommitID { option (gogoproto.goproto_stringer) = false; int64 version = 1; - bytes hash = 2; + bytes hash = 2; } diff --git a/store/iavl/store.go b/store/iavl/store.go index 3721400e2023..9adc56cda978 100644 --- a/store/iavl/store.go +++ b/store/iavl/store.go @@ -81,7 +81,7 @@ func LoadStoreWithInitialVersion(db dbm.DB, logger log.Logger, key types.StoreKe if err != nil { return nil, err } - + istore.tree.(*immutableTree) if logger != nil { logger.Debug("Finished loading IAVL tree") } diff --git a/store/iavl/store_test.go b/store/iavl/store_test.go index ae83b863e485..5febb2f49f63 100644 --- a/store/iavl/store_test.go +++ b/store/iavl/store_test.go @@ -460,9 +460,7 @@ func TestIAVLNoPrune(t *testing.T) { } func TestIAVLStoreQuery(t *testing.T) { - db := dbm.NewMemDB() - tree, err := iavl.NewMutableTree(db, cacheSize, false) - require.NoError(t, err) + tree := iavl.NewMutableTree(dbm.NewMemDB(), 100, false, log.NewNopLogger()) iavlStore := UnsafeNewStore(tree) @@ -563,10 +561,8 @@ func TestIAVLStoreQuery(t *testing.T) { func BenchmarkIAVLIteratorNext(b *testing.B) { b.ReportAllocs() - db := dbm.NewMemDB() treeSize := 1000 - tree, err := iavl.NewMutableTree(db, cacheSize, false) - require.NoError(b, err) + tree := iavl.NewMutableTree(dbm.NewMemDB(), 100, false, log.NewNopLogger()) for i := 0; i < treeSize; i++ { key := randBytes(4) @@ -599,8 +595,7 @@ func TestSetInitialVersion(t *testing.T) { { "works with a mutable tree", func(db *dbm.MemDB) *Store { - tree, err := iavl.NewMutableTree(db, cacheSize, false) - require.NoError(t, err) + tree := iavl.NewMutableTree(dbm.NewMemDB(), 100, false, log.NewNopLogger()) store := UnsafeNewStore(tree) return store @@ -609,8 +604,7 @@ func TestSetInitialVersion(t *testing.T) { { "throws error on immutable tree", func(db *dbm.MemDB) *Store { - tree, err := iavl.NewMutableTree(db, cacheSize, false) - require.NoError(t, err) + tree := iavl.NewMutableTree(dbm.NewMemDB(), 100, false, log.NewNopLogger()) store := UnsafeNewStore(tree) _, version, err := store.tree.SaveVersion() require.NoError(t, err)