Skip to content

Commit

Permalink
refactor: minimal logger interface (#964)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Jul 25, 2024
1 parent a514883 commit 59e2992
Show file tree
Hide file tree
Showing 24 changed files with 214 additions and 206 deletions.
7 changes: 3 additions & 4 deletions basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"sort"
"testing"

"cosmossdk.io/core/log"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand Down Expand Up @@ -442,14 +441,14 @@ func TestPersistence(t *testing.T) {
}

// Construct some tree and save it
t1 := NewMutableTree(db, 0, false, log.NewNopLogger())
t1 := NewMutableTree(db, 0, false, NewNopLogger())
for key, value := range records {
t1.Set([]byte(key), []byte(value))
}
t1.SaveVersion()

// Load a tree
t2 := NewMutableTree(db, 0, false, log.NewNopLogger())
t2 := NewMutableTree(db, 0, false, NewNopLogger())
t2.Load()
for key, value := range records {
t2value, err := t2.Get([]byte(key))
Expand Down Expand Up @@ -497,7 +496,7 @@ func TestProof(t *testing.T) {

func TestTreeProof(t *testing.T) {
db := dbm.NewMemDB()
tree := NewMutableTree(db, 100, false, log.NewNopLogger())
tree := NewMutableTree(db, 100, false, NewNopLogger())
hash := tree.Hash()
assert.Equal(t, "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", hex.EncodeToString(hash))

Expand Down
3 changes: 1 addition & 2 deletions benchmarks/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"runtime"
"testing"

"cosmossdk.io/core/log"
corestore "cosmossdk.io/core/store"
"github.com/stretchr/testify/require"

Expand All @@ -27,7 +26,7 @@ func randBytes(length int) []byte {
}

func prepareTree(b *testing.B, db dbm.DB, size, keyLen, dataLen int) (*iavl.MutableTree, [][]byte) {
t := iavl.NewMutableTree(db, size, false, log.NewNopLogger())
t := iavl.NewMutableTree(db, size, false, iavl.NewNopLogger())
keys := make([][]byte, size)

for i := 0; i < size; i++ {
Expand Down
8 changes: 3 additions & 5 deletions benchmarks/cosmos-exim/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (
"os"
"time"

"cosmossdk.io/core/log"

"github.com/cosmos/iavl"
idbm "github.com/cosmos/iavl/db"
)
Expand Down Expand Up @@ -92,7 +90,7 @@ func runExport(dbPath string) (int64, map[string][]*iavl.ExportNode, error) {
if err != nil {
return 0, nil, err
}
tree := iavl.NewMutableTree(idbm.NewPrefixDB(ldb, []byte("s/k:main/")), 0, false, log.NewNopLogger())
tree := iavl.NewMutableTree(idbm.NewPrefixDB(ldb, []byte("s/k:main/")), 0, false, iavl.NewNopLogger())
version, err := tree.LoadVersion(0)
if err != nil {
return 0, nil, err
Expand All @@ -104,7 +102,7 @@ func runExport(dbPath string) (int64, map[string][]*iavl.ExportNode, error) {
totalStats := Stats{}
for _, name := range stores {
db := idbm.NewPrefixDB(ldb, []byte("s/k:"+name+"/"))
tree := iavl.NewMutableTree(db, 0, false, log.NewNopLogger())
tree := iavl.NewMutableTree(db, 0, false, iavl.NewNopLogger())

stats := Stats{}
export := make([]*iavl.ExportNode, 0, 100000)
Expand Down Expand Up @@ -169,7 +167,7 @@ func runImport(version int64, exports map[string][]*iavl.ExportNode) error {
if err != nil {
return err
}
newTree := iavl.NewMutableTree(newDB, 0, false, log.NewNopLogger())
newTree := iavl.NewMutableTree(newDB, 0, false, iavl.NewNopLogger())
importer, err := newTree.Import(version)
if err != nil {
return err
Expand Down
12 changes: 6 additions & 6 deletions cmd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/cosmos/iavl/cmd
go 1.21

require (
cosmossdk.io/core v0.12.1-0.20240514205955-97c9bbb0341b
cosmossdk.io/log v1.3.2-0.20240514205955-97c9bbb0341b
cosmossdk.io/core v0.12.1-0.20240725072823-6a2d039e1212
cosmossdk.io/log v1.3.1
github.com/cosmos/cosmos-db v1.0.2
github.com/cosmos/iavl v1.2.0
)
Expand All @@ -18,7 +18,7 @@ require (
github.com/cockroachdb/pebble v1.1.0 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cosmos/gogoproto v1.4.12 // indirect
github.com/cosmos/gogoproto v1.5.0 // indirect
github.com/cosmos/ics23/go v0.10.0 // indirect
github.com/emicklei/dot v1.6.2 // indirect
github.com/getsentry/sentry-go v0.18.0 // indirect
Expand All @@ -45,9 +45,9 @@ require (
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
)

replace github.com/cosmos/iavl => ../.
32 changes: 16 additions & 16 deletions cmd/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cosmossdk.io/core v0.12.1-0.20240514205955-97c9bbb0341b h1:QudoITEtzaPNGltOQSyMbVopBQ2Z28h717nwLhlj6JU=
cosmossdk.io/core v0.12.1-0.20240514205955-97c9bbb0341b/go.mod h1:jJ3gjbqJyHPrTjn2Ad6wjb7Oz90G1ZjDg0JyBii41QE=
cosmossdk.io/log v1.3.2-0.20240514205955-97c9bbb0341b h1:twjCK9N+p+6wEdJ33KRTXgCicmbJGoj47AEOFS0/qsg=
cosmossdk.io/log v1.3.2-0.20240514205955-97c9bbb0341b/go.mod h1:FcxhbFGkwLGFr3NsnSLsfrxjpCdQQ7ow3GaYaw5Zb70=
cosmossdk.io/core v0.12.1-0.20240725072823-6a2d039e1212 h1:yLjl2aq6XMa5Zb1aKfwNHn1U+fFmmAtZyWKNWm/yVH8=
cosmossdk.io/core v0.12.1-0.20240725072823-6a2d039e1212/go.mod h1:sLzMwAW9HW+Nm3GltUVHDRSRZbcXLy9+2AYgi2bwt/s=
cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI=
cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
Expand Down Expand Up @@ -73,8 +73,8 @@ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs=
github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA=
github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE=
github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY=
github.com/cosmos/gogoproto v1.5.0 h1:SDVwzEqZDDBoslaeZg+dGE55hdzHfgUA40pEanMh52o=
github.com/cosmos/gogoproto v1.5.0/go.mod h1:iUM31aofn3ymidYG6bUR5ZFrk+Om8p5s754eMUcyp8I=
github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM=
github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
Expand Down Expand Up @@ -362,8 +362,8 @@ golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand All @@ -380,8 +380,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down Expand Up @@ -428,17 +428,17 @@ golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down Expand Up @@ -563,8 +563,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
2 changes: 1 addition & 1 deletion db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ func main() {
panic(err)
}

tree := iavl.NewMutableTree(idbm.NewWrapper(dbm.NewPrefixDB(levelDB, []byte("s/k:main/"))), 0, false, log.NewNopLogger())
tree := iavl.NewMutableTree(idbm.NewWrapper(dbm.NewPrefixDB(levelDB, []byte("s/k:main/"))), 0, false, NewNopLogger())
}
```
5 changes: 2 additions & 3 deletions diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"sort"
"testing"

"cosmossdk.io/core/log"
"github.com/stretchr/testify/require"

dbm "github.com/cosmos/iavl/db"
Expand All @@ -21,7 +20,7 @@ func TestDiffRoundTrip(t *testing.T) {

// apply changeSets to tree
db := dbm.NewMemDB()
tree := NewMutableTree(db, 0, true, log.NewNopLogger())
tree := NewMutableTree(db, 0, true, NewNopLogger())
for i := range changeSets {
v, err := tree.SaveChangeSet(changeSets[i])
require.NoError(t, err)
Expand All @@ -30,7 +29,7 @@ func TestDiffRoundTrip(t *testing.T) {

// extract change sets from db
var extractChangeSets []*ChangeSet
tree2 := NewImmutableTree(db, 0, true, log.NewNopLogger())
tree2 := NewImmutableTree(db, 0, true, NewNopLogger())
err := tree2.TraverseStateChanges(0, math.MaxInt64, func(_ int64, changeSet *ChangeSet) error {
extractChangeSets = append(extractChangeSets, changeSet)
return nil
Expand Down
13 changes: 6 additions & 7 deletions export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"math/rand"
"testing"

"cosmossdk.io/core/log"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand All @@ -15,7 +14,7 @@ import (
// setupExportTreeBasic sets up a basic tree with a handful of
// create/update/delete operations over a few versions.
func setupExportTreeBasic(t require.TestingT) *ImmutableTree {
tree := NewMutableTree(dbm.NewMemDB(), 0, false, log.NewNopLogger())
tree := NewMutableTree(dbm.NewMemDB(), 0, false, NewNopLogger())

_, err := tree.Set([]byte("x"), []byte{255})
require.NoError(t, err)
Expand Down Expand Up @@ -74,7 +73,7 @@ func setupExportTreeRandom(t *testing.T) *ImmutableTree {
)

r := rand.New(rand.NewSource(randSeed))
tree := NewMutableTree(dbm.NewMemDB(), 0, false, log.NewNopLogger())
tree := NewMutableTree(dbm.NewMemDB(), 0, false, NewNopLogger())

var version int64
keys := make([][]byte, 0, versionOps)
Expand Down Expand Up @@ -134,7 +133,7 @@ func setupExportTreeSized(t require.TestingT, treeSize int) *ImmutableTree {
)

r := rand.New(rand.NewSource(randSeed))
tree := NewMutableTree(dbm.NewMemDB(), 0, false, log.NewNopLogger())
tree := NewMutableTree(dbm.NewMemDB(), 0, false, NewNopLogger())

for i := 0; i < treeSize; i++ {
key := make([]byte, keySize)
Expand Down Expand Up @@ -228,7 +227,7 @@ func TestExporterCompress(t *testing.T) {

func TestExporter_Import(t *testing.T) {
testcases := map[string]*ImmutableTree{
"empty tree": NewImmutableTree(dbm.NewMemDB(), 0, false, log.NewNopLogger()),
"empty tree": NewImmutableTree(dbm.NewMemDB(), 0, false, NewNopLogger()),
"basic tree": setupExportTreeBasic(t),
}
if !testing.Short() {
Expand All @@ -255,7 +254,7 @@ func TestExporter_Import(t *testing.T) {
exporter = NewCompressExporter(innerExporter)
}

newTree := NewMutableTree(dbm.NewMemDB(), 0, false, log.NewNopLogger())
newTree := NewMutableTree(dbm.NewMemDB(), 0, false, NewNopLogger())
innerImporter, err := newTree.Import(tree.Version())
require.NoError(t, err)
defer innerImporter.Close()
Expand Down Expand Up @@ -323,7 +322,7 @@ func TestExporter_Close(t *testing.T) {
}

func TestExporter_DeleteVersionErrors(t *testing.T) {
tree := NewMutableTree(dbm.NewMemDB(), 0, false, log.NewNopLogger())
tree := NewMutableTree(dbm.NewMemDB(), 0, false, NewNopLogger())

_, err := tree.Set([]byte("a"), []byte{1})
require.NoError(t, err)
Expand Down
7 changes: 3 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/cosmos/iavl
go 1.21

require (
cosmossdk.io/core v0.12.1-0.20240514205955-97c9bbb0341b
cosmossdk.io/core v0.12.1-0.20240725072823-6a2d039e1212
github.com/cosmos/ics23/go v0.10.0
github.com/emicklei/dot v1.6.2
github.com/gogo/protobuf v1.3.2
Expand All @@ -14,17 +14,16 @@ require (
)

require (
github.com/cosmos/gogoproto v1.4.12 // indirect
github.com/cosmos/gogoproto v1.5.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/onsi/gomega v1.26.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
google.golang.org/protobuf v1.34.1 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

Expand Down
Loading

0 comments on commit 59e2992

Please sign in to comment.