Skip to content

Commit

Permalink
fix rocksdb build
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Jul 18, 2024
1 parent a9be0f5 commit e103091
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ func New(
// wire up the versiondb's `StreamingService` and `MultiStore`.
if cast.ToBool(appOpts.Get("versiondb.enable")) {
var err error
app.qms, err = setupVersionDB(homePath, bApp, keys, tkeys, memKeys, okeys)
app.qms, err = app.setupVersionDB(homePath, keys, tkeys, memKeys, okeys)

Check failure on line 740 in app/app.go

View workflow job for this annotation

GitHub Actions / check

app.setupVersionDB undefined (type *ChainApp has no field or method setupVersionDB)

Check failure on line 740 in app/app.go

View workflow job for this annotation

GitHub Actions / Build

app.setupVersionDB undefined (type *ChainApp has no field or method setupVersionDB)

Check failure on line 740 in app/app.go

View workflow job for this annotation

GitHub Actions / codecov

app.setupVersionDB undefined (type *ChainApp has no field or method setupVersionDB)

Check failure on line 740 in app/app.go

View workflow job for this annotation

GitHub Actions / codecov

app.setupVersionDB undefined (type *ChainApp has no field or method setupVersionDB)

Check failure on line 740 in app/app.go

View workflow job for this annotation

GitHub Actions / codecov

app.setupVersionDB undefined (type *ChainApp has no field or method setupVersionDB)

Check failure on line 740 in app/app.go

View workflow job for this annotation

GitHub Actions / golangci-lint

app.setupVersionDB undefined (type *ChainApp has no field or method setupVersionDB)) (typecheck)

Check failure on line 740 in app/app.go

View workflow job for this annotation

GitHub Actions / golangci-lint

app.setupVersionDB undefined (type *ChainApp has no field or method setupVersionDB)) (typecheck)

Check failure on line 740 in app/app.go

View workflow job for this annotation

GitHub Actions / golangci-lint

app.setupVersionDB undefined (type *ChainApp has no field or method setupVersionDB)) (typecheck)

Check failure on line 740 in app/app.go

View workflow job for this annotation

GitHub Actions / golangci-lint

app.setupVersionDB undefined (type *ChainApp has no field or method setupVersionDB)

Check failure on line 740 in app/app.go

View workflow job for this annotation

GitHub Actions / Build For Windows

app.setupVersionDB undefined (type *ChainApp has no field or method setupVersionDB)

Check failure on line 740 in app/app.go

View workflow job for this annotation

GitHub Actions / Analyze (go)

app.setupVersionDB undefined (type *ChainApp has no field or method setupVersionDB)
if err != nil {
panic(err)
}
Expand Down
6 changes: 2 additions & 4 deletions app/versiondb.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,17 @@ import (
"path/filepath"

storetypes "cosmossdk.io/store/types"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/crypto-org-chain/cronos/versiondb"
"github.com/crypto-org-chain/cronos/versiondb/tsrocksdb"
)

func setupVersionDB(
func (app *ChainApp) setupVersionDB(
homePath string,
app *baseapp.BaseApp,
keys map[string]*storetypes.KVStoreKey,
tkeys map[string]*storetypes.TransientStoreKey,
memKeys map[string]*storetypes.MemoryStoreKey,
okeys map[string]*storetypes.ObjectStoreKey,
) (storetypes.MultiStore, error) {
) (storetypes.RootMultiStore, error) {
dataDir := filepath.Join(homePath, "data", "versiondb")
if err := os.MkdirAll(dataDir, os.ModePerm); err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion cmd/chain-maind/app/versiondb.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

func ChangeSetCmd() *cobra.Command {
keys, _, _ := app.StoreKeys()
keys, _, _, _ := app.StoreKeys()
storeNames := make([]string, 0, len(keys))
for name := range keys {
storeNames = append(storeNames, name)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
cosmossdk.io/x/feegrant v0.1.0
cosmossdk.io/x/upgrade v0.1.1
github.com/cometbft/cometbft v0.38.10
github.com/cosmos/cosmos-db v1.0.2
github.com/cosmos/cosmos-db v1.0.3-0.20240408151834-e75f6e4b28d8
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.50.8
github.com/cosmos/gogoproto v1.4.12
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,8 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk=
github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis=
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/cosmos-db v1.0.3-0.20240408151834-e75f6e4b28d8 h1:QV1tpwwqSPWcs1Hy07Y5JHfa61bE/Cz+blqKtuaz86c=
github.com/cosmos/cosmos-db v1.0.3-0.20240408151834-e75f6e4b28d8/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA=
github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA=
github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec=
github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=
Expand Down
4 changes: 2 additions & 2 deletions gomod2nix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ schema = 3
version = "v1.0.5"
hash = "sha256-t572Sr5iiHcuMKLMWa2i+LBAt192oa+G1oA371tG/eI="
[mod."github.com/cosmos/cosmos-db"]
version = "v1.0.2"
hash = "sha256-WjDoB2AGoIyEW30LlGcQX5JVACJbs0jWSY58IuJHz0M="
version = "v1.0.3-0.20240408151834-e75f6e4b28d8"
hash = "sha256-8g+F6KqJD4UymXZjES5TG4FQ/Pyww2SjpXOOibyztRc="
[mod."github.com/cosmos/cosmos-proto"]
version = "v1.0.0-beta.5"
hash = "sha256-Fy/PbsOsd6iq0Njy3DVWK6HqWsogI+MkE8QslHGWyVg="
Expand Down

0 comments on commit e103091

Please sign in to comment.