Skip to content

Commit

Permalink
Fix ss store for latest seidb
Browse files Browse the repository at this point in the history
  • Loading branch information
yzang2019 committed Jun 25, 2024
1 parent e257423 commit 25b139e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ replace (
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
github.com/sei-protocol/sei-db => github.com/sei-protocol/sei-db v0.0.38
github.com/sei-protocol/sei-db => github.com/sei-protocol/sei-db v0.0.39-0.20240625173036-9959509c36ed
// Latest goleveldb is broken, we have to stick to this version
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
github.com/tendermint/tendermint => github.com/sei-protocol/sei-tendermint v0.3.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -967,8 +967,8 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg
github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY=
github.com/sei-protocol/go-ethereum v1.13.5-sei-21 h1:uzBquo71kOMs2bZjmYsiDQb7t5VpksYzOHnpGGQNaIU=
github.com/sei-protocol/go-ethereum v1.13.5-sei-21/go.mod h1:kcRZmuzRn1lVejiFNTz4l4W7imnpq1bDAnuKS/RyhbQ=
github.com/sei-protocol/sei-db v0.0.38 h1:GiQl3qBd6XgGsHkJd4I8GnOmGjGoWQg3SJAS82TTNao=
github.com/sei-protocol/sei-db v0.0.38/go.mod h1:F/ZKZA8HJPcUzSZPA8yt6pfwlGriJ4RDR4eHKSGLStI=
github.com/sei-protocol/sei-db v0.0.39-0.20240625173036-9959509c36ed h1:h7RO/5AvVNBoGReLsVjcKuNU24liR5nKmQZ9zhM2/Do=
github.com/sei-protocol/sei-db v0.0.39-0.20240625173036-9959509c36ed/go.mod h1:F/ZKZA8HJPcUzSZPA8yt6pfwlGriJ4RDR4eHKSGLStI=
github.com/sei-protocol/sei-iavl v0.1.9 h1:y4mVYftxLNRs6533zl7N0/Ch+CzRQc04JDfHolIxgBE=
github.com/sei-protocol/sei-iavl v0.1.9/go.mod h1:7PfkEVT5dcoQE+s/9KWdoXJ8VVVP1QpYYPLdxlkSXFk=
github.com/sei-protocol/sei-tendermint v0.3.2 h1:Fiwr0y09GT5Gv/iGXVi6itRdwdUdh//O/oQTHq3x33c=
Expand Down
7 changes: 2 additions & 5 deletions storev2/rootmulti/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func NewStore(
pendingChanges: make(chan VersionedChangesets, 1000),
}
if ssConfig.Enable {
ssStore, err := ss.NewStateStore(homeDir, ssConfig)
ssStore, err := ss.NewStateStore(logger, homeDir, ssConfig)
if err != nil {
panic(err)
}
Expand All @@ -84,14 +84,11 @@ func NewStore(
if ssVersion <= 0 && scVersion > 0 {
panic("Enabling SS store without state sync could cause data corruption")
}
if err = ss.RecoverStateStore(homeDir, logger, ssStore); err != nil {
if err = ss.RecoverStateStore(logger, homeDir, ssStore); err != nil {
panic(err)
}
store.ssStore = ssStore
go store.StateStoreCommit()
store.pruningManager = pruning.NewPruningManager(
logger, ssStore, int64(ssConfig.KeepRecent), int64(ssConfig.PruneIntervalSeconds))
store.pruningManager.Start()
}
return store

Expand Down

0 comments on commit 25b139e

Please sign in to comment.