Skip to content

Commit

Permalink
feat(simapp/v2): Add store server to testnet init cmd (#21076)
Browse files Browse the repository at this point in the history
  • Loading branch information
hieuvubk authored Jul 25, 2024
1 parent a020729 commit b6eaf70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/local-testnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SIMD="$ROOT/build/simdv2"

COSMOS_BUILD_OPTIONS=v2 make build

$SIMD testnet init-files --chain-id=testing --output-dir="$HOME/.testnet" --validator-count=3 --keyring-backend=test --minimum-gas-prices=0.000001stake --commit-timeout=900ms --single-host
$SIMD testnet init-files --chain-id=testing --output-dir="$HOME/.testnet" --validator-count=3 --keyring-backend=test --min-gas-prices=0.000001stake --commit-timeout=900ms --single-host

$SIMD start --log_level=info --home "$HOME/.testnet/node0/simdv2" &
$SIMD start --log_level=info --home "$HOME/.testnet/node1/simdv2" &
Expand Down
4 changes: 3 additions & 1 deletion simapp/v2/simdv2/cmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
serverv2 "cosmossdk.io/server/v2"
"cosmossdk.io/server/v2/api/grpc"
"cosmossdk.io/server/v2/cometbft"
"cosmossdk.io/server/v2/store"
authtypes "cosmossdk.io/x/auth/types"
banktypes "cosmossdk.io/x/bank/types"
stakingtypes "cosmossdk.io/x/staking/types"
Expand Down Expand Up @@ -343,7 +344,8 @@ func initTestnetFiles[T transaction.Tx](
cometbft.OverwriteDefaultConfigTomlConfig(nodeConfig),
)
grpcServer := grpc.New[T](grpc.OverwriteDefaultConfig(grpcConfig))
server := serverv2.NewServer(coretesting.NewNopLogger(), cometServer, grpcServer)
storeServer := store.New[T]()
server := serverv2.NewServer(coretesting.NewNopLogger(), cometServer, grpcServer, storeServer)
err = server.WriteConfig(filepath.Join(nodeDir, "config"))
if err != nil {
return err
Expand Down

0 comments on commit b6eaf70

Please sign in to comment.