Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cool-develope committed Jul 29, 2024
1 parent dff8162 commit 7277c97
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 531 deletions.
4 changes: 0 additions & 4 deletions benchmarks/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ import (
"runtime"
"testing"

<<<<<<< HEAD
=======
"cosmossdk.io/core/log"
corestore "cosmossdk.io/core/store"
>>>>>>> e063edd (refactor: remove cosmos-db as a dep (#955))
"github.com/stretchr/testify/require"

"github.com/cosmos/iavl"
Expand Down
25 changes: 3 additions & 22 deletions benchmarks/cosmos-exim/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ import (
"os"
"time"

<<<<<<< HEAD
tmdb "github.com/cosmos/cosmos-db"
=======
"cosmossdk.io/core/log"
>>>>>>> e063edd (refactor: remove cosmos-db as a dep (#955))

"github.com/cosmos/iavl"
idbm "github.com/cosmos/iavl/db"
)
Expand Down Expand Up @@ -96,11 +90,7 @@ func runExport(dbPath string) (int64, map[string][]*iavl.ExportNode, error) {
if err != nil {
return 0, nil, err
}
<<<<<<< HEAD
tree := iavl.NewMutableTree(idbm.NewWrapper(tmdb.NewPrefixDB(ldb, []byte("s/k:main/"))), 0, false, iavl.NewNopLogger())
=======
tree := iavl.NewMutableTree(idbm.NewPrefixDB(ldb, []byte("s/k:main/")), 0, false, log.NewNopLogger())
>>>>>>> e063edd (refactor: remove cosmos-db as a dep (#955))
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 @@ -111,13 +101,8 @@ func runExport(dbPath string) (int64, map[string][]*iavl.ExportNode, error) {

totalStats := Stats{}
for _, name := range stores {
<<<<<<< HEAD
db := tmdb.NewPrefixDB(ldb, []byte("s/k:"+name+"/"))
tree := iavl.NewMutableTree(idbm.NewWrapper(db), 0, false, iavl.NewNopLogger())
=======
db := idbm.NewPrefixDB(ldb, []byte("s/k:"+name+"/"))
tree := iavl.NewMutableTree(db, 0, false, log.NewNopLogger())
>>>>>>> e063edd (refactor: remove cosmos-db as a dep (#955))
tree := iavl.NewMutableTree(db, 0, false, iavl.NewNopLogger())

stats := Stats{}
export := make([]*iavl.ExportNode, 0, 100000)
Expand Down Expand Up @@ -182,11 +167,7 @@ func runImport(version int64, exports map[string][]*iavl.ExportNode) error {
if err != nil {
return err
}
<<<<<<< HEAD
newTree := iavl.NewMutableTree(idbm.NewWrapper(newDB), 0, false, iavl.NewNopLogger())
=======
newTree := iavl.NewMutableTree(newDB, 0, false, log.NewNopLogger())
>>>>>>> e063edd (refactor: remove cosmos-db as a dep (#955))
newTree := iavl.NewMutableTree(newDB, 0, false, iavl.NewNopLogger())
importer, err := newTree.Import(version)
if err != nil {
return err
Expand Down
5 changes: 0 additions & 5 deletions diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,8 @@ func TestDiffRoundTrip(t *testing.T) {

// extract change sets from db
var extractChangeSets []*ChangeSet
<<<<<<< HEAD
tree2 := NewImmutableTree(db, 0, true, NewNopLogger())
err := tree2.TraverseStateChanges(0, math.MaxInt64, func(version int64, changeSet *ChangeSet) error {
=======
tree2 := NewImmutableTree(db, 0, true, log.NewNopLogger())
err := tree2.TraverseStateChanges(0, math.MaxInt64, func(_ int64, changeSet *ChangeSet) error {
>>>>>>> e063edd (refactor: remove cosmos-db as a dep (#955))
extractChangeSets = append(extractChangeSets, changeSet)
return nil
})
Expand Down
46 changes: 1 addition & 45 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,14 @@ module github.com/cosmos/iavl
go 1.20

require (
<<<<<<< HEAD
cosmossdk.io/log v1.3.1
github.com/cosmos/cosmos-db v1.0.0
=======
cosmossdk.io/core v0.12.1-0.20240514205955-97c9bbb0341b
>>>>>>> e063edd (refactor: remove cosmos-db as a dep (#955))
github.com/cosmos/ics23/go v0.10.0
github.com/emicklei/dot v1.4.2
github.com/golang/mock v1.6.0
github.com/google/btree v1.1.2
<<<<<<< HEAD
github.com/stretchr/testify v1.8.4
golang.org/x/crypto v0.12.0
google.golang.org/protobuf v1.30.0
)

require (
github.com/DataDog/zstd v1.4.5 // indirect
github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cockroachdb/errors v1.8.1 // indirect
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f // indirect
github.com/cockroachdb/pebble v0.0.0-20220817183557-09c6e030a677 // indirect
github.com/cockroachdb/redact v1.0.8 // indirect
github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 // indirect
github.com/cosmos/gogoproto v1.4.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/klauspost/compress v1.15.9 // indirect
github.com/kr/pretty v0.3.1 // indirect
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.20 // indirect
=======
github.com/stretchr/testify v1.9.0
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
google.golang.org/protobuf v1.34.1
)

require (
Expand All @@ -51,23 +20,10 @@ require (
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
>>>>>>> e063edd (refactor: remove cosmos-db as a dep (#955))
github.com/onsi/gomega v1.26.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
<<<<<<< HEAD
github.com/rogpeppe/go-internal v1.9.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.15.0 // indirect
gonum.org/v1/gonum v0.11.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
>>>>>>> e063edd (refactor: remove cosmos-db as a dep (#955))
gopkg.in/yaml.v3 v3.0.1 // indirect
)

Expand Down
Loading

0 comments on commit 7277c97

Please sign in to comment.