Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use expected logger interface in iavl 1.2 #965

Merged
merged 4 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

- [#965](https://github.com/cosmos/iavl/pull/965) Use expected interface for expected IAVL `Logger`.

## v1.2.0 May 13, 2024

### Improvements
Expand Down
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/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 @@ -9,7 +9,6 @@ import (
"strings"
"testing"

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

"github.com/cosmos/iavl"
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
7 changes: 3 additions & 4 deletions benchmarks/cosmos-exim/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"os"
"time"

"cosmossdk.io/log"
tmdb "github.com/cosmos/cosmos-db"

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

stats := Stats{}
export := make([]*iavl.ExportNode, 0, 100000)
Expand Down Expand Up @@ -170,7 +169,7 @@ func runImport(version int64, exports map[string][]*iavl.ExportNode) error {
if err != nil {
return err
}
newTree := iavl.NewMutableTree(idbm.NewWrapper(newDB), 0, false, log.NewNopLogger())
newTree := iavl.NewMutableTree(idbm.NewWrapper(newDB), 0, false, iavl.NewNopLogger())
importer, err := newTree.Import(version)
if err != nil {
return err
Expand Down
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/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(version 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/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
8 changes: 4 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.20

require (
cosmossdk.io/log v1.2.0
cosmossdk.io/log v1.3.1
github.com/cosmos/cosmos-db v1.0.0
github.com/cosmos/ics23/go v0.10.0
github.com/emicklei/dot v1.4.2
Expand Down Expand Up @@ -33,17 +33,17 @@ require (
github.com/kr/text v0.2.0 // indirect
github.com/linxGnu/grocksdb v1.7.15 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/onsi/gomega v1.26.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/rs/zerolog v1.30.0 // indirect
github.com/rs/zerolog v1.32.0 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/sys v0.15.0 // indirect
gonum.org/v1/gonum v0.11.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Expand Down
24 changes: 11 additions & 13 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cosmossdk.io/log v1.2.0 h1:BbykkDsutXPSy8RojFB3KZEWyvMsToLy0ykb/ZhsLqQ=
cosmossdk.io/log v1.2.0/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4=
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/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
Expand Down Expand Up @@ -120,7 +120,7 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
Expand Down Expand Up @@ -168,16 +168,15 @@ github.com/linxGnu/grocksdb v1.7.15 h1:AEhP28lkeAybv5UYNYviYISpR6bJejEnKuYbnWAnx
github.com/linxGnu/grocksdb v1.7.15/go.mod h1:pY55D0o+r8yUYLq70QmhdudxYvoDb9F+9puf4m3/W+U=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw=
github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg=
github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ=
Expand Down Expand Up @@ -216,8 +215,8 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c=
github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w=
github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0=
github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw=
Expand Down Expand Up @@ -337,14 +336,13 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210909193231-528a39cd75f3/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
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.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.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.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
Expand Down Expand Up @@ -412,7 +410,7 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY=
gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
6 changes: 2 additions & 4 deletions immutable_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
"fmt"
"strings"

"cosmossdk.io/log"

dbm "github.com/cosmos/iavl/db"
)

Expand All @@ -16,7 +14,7 @@ import (
// Returned key/value byte slices must not be modified, since they may point to data located inside
// IAVL which would also be modified.
type ImmutableTree struct {
logger log.Logger
logger Logger

root *Node
ndb *nodeDB
Expand All @@ -25,7 +23,7 @@ type ImmutableTree struct {
}

// NewImmutableTree creates both in-memory and persistent instances
func NewImmutableTree(db dbm.DB, cacheSize int, skipFastStorageUpgrade bool, lg log.Logger, options ...Option) *ImmutableTree {
func NewImmutableTree(db dbm.DB, cacheSize int, skipFastStorageUpgrade bool, lg Logger, options ...Option) *ImmutableTree {
opts := DefaultOptions()
for _, opt := range options {
opt(&opts)
Expand Down
Loading
Loading