diff --git a/cli_test/test_helpers.go b/cli_test/test_helpers.go index 82484df0..9580f7ce 100644 --- a/cli_test/test_helpers.go +++ b/cli_test/test_helpers.go @@ -19,6 +19,15 @@ import ( "github.com/spf13/cobra" "github.com/stretchr/testify/require" + ostcmd "github.com/Finschia/ostracon/cmd/ostracon/commands" + ostcfg "github.com/Finschia/ostracon/config" + "github.com/Finschia/ostracon/libs/log" + osthttp "github.com/Finschia/ostracon/rpc/client/http" + ostctypes "github.com/Finschia/ostracon/rpc/core/types" + osttypes "github.com/Finschia/ostracon/types" + wasmcli "github.com/Finschia/wasmd/x/wasm/client/cli" + wasmtypes "github.com/Finschia/wasmd/x/wasm/types" + "github.com/Finschia/finschia-sdk/baseapp" "github.com/Finschia/finschia-sdk/client" clientkeys "github.com/Finschia/finschia-sdk/client/keys" @@ -52,15 +61,6 @@ import ( stakingcli "github.com/Finschia/finschia-sdk/x/staking/client/cli" staking "github.com/Finschia/finschia-sdk/x/staking/types" "github.com/Finschia/finschia-sdk/x/stakingplus" - ostcmd "github.com/Finschia/ostracon/cmd/ostracon/commands" - ostcfg "github.com/Finschia/ostracon/config" - "github.com/Finschia/ostracon/libs/log" - osthttp "github.com/Finschia/ostracon/rpc/client/http" - ostctypes "github.com/Finschia/ostracon/rpc/core/types" - osttypes "github.com/Finschia/ostracon/types" - wasmcli "github.com/Finschia/wasmd/x/wasm/client/cli" - wasmtypes "github.com/Finschia/wasmd/x/wasm/types" - "github.com/Finschia/finschia/v4/app" fnsacmd "github.com/Finschia/finschia/v4/cmd/fnsad/cmd" fnsatypes "github.com/Finschia/finschia/v4/types" @@ -128,9 +128,7 @@ var ( } ) -var ( - minGasPrice = sdk.NewCoin(feeDenom, sdk.ZeroInt()) -) +var minGasPrice = sdk.NewCoin(feeDenom, sdk.ZeroInt()) func init() { testnet := false @@ -522,7 +520,8 @@ func (f *Fixtures) TxEncode(fileName string, flags ...string) (testutil.BufferWr // TxMultisign is fnsad tx multisign func (f *Fixtures) TxMultisign(fileName, name string, signaturesFiles []string, - flags ...string) (testutil.BufferWriter, error) { + flags ...string, +) (testutil.BufferWriter, error) { args := fmt.Sprintf("--keyring-backend=test %s %s %s --node=%s", fileName, name, strings.Join(signaturesFiles, " "), f.RPCAddr) cmd := authcli.GetMultiSignCommand() return testcli.ExecTestCLICmd(getCliCtx(f), cmd, addFlags(args, flags...)) @@ -1186,6 +1185,7 @@ func (fg *FixtureGroup) initNodes(numberOfNodes int) { require.NoError(t, err) } } + func (fg *FixtureGroup) FinschiaStartCluster(minGasPrices string, _ ...string) { genDoc, err := osttypes.GenesisDocFromJSON(fg.genesisFileContent) require.NoError(fg.T, err) @@ -1413,7 +1413,6 @@ func newValidator(f *Fixtures, cfg testnet.Config, appCfg *srvconfig.Config, ctx appCfg.API.Address = f.P2PAddr tmCfg.P2P.ListenAddress = f.P2PAddr tmCfg.RPC.ListenAddress = f.RPCAddr - appCfg.GRPCWeb.Enable = false appCfg.GRPC.Address = f.GRPCAddr appCfg.GRPC.Enable = true diff --git a/init_multi.sh b/init_multi.sh index 7f930ceb..e87b8886 100644 --- a/init_multi.sh +++ b/init_multi.sh @@ -99,7 +99,6 @@ RPC_PORT=26657 P2P_PORT=26656 PROF_PORT=6060 GRPC_PORT=9090 -GRPC_WEB_PORT=9091 # Set genesis file and config(port, peer, ...) CHAIN_0_DIR="${CHAIN_DIR_PREFIX}0" @@ -131,7 +130,6 @@ for ((i = 0; i < N; i++)) sed -i 's#'"${MEMO}"'#'"${MEMO_SPLIT[1]}"':'"${P2P_PORT}"'#g' ${CHAIN_0_DIR}/config/config.toml # change port of persistent_peers sed -i 's/pruning = "default"/pruning = "nothing"/g' ${CHAIN_DIR}/config/app.toml - sed -i 's#"0.0.0.0:9091"#"0.0.0.0:'"${GRPC_WEB_PORT}"'"#g' ${CHAIN_DIR}/config/app.toml sed -i 's#"0.0.0.0:9090"#"0.0.0.0:'"${GRPC_PORT}"'"#g' ${CHAIN_DIR}/config/app.toml else sed -i '' 's#"tcp://127.0.0.1:26657"#"tcp://0.0.0.0:'"${RPC_PORT}"'"#g' ${CHAIN_DIR}/config/config.toml @@ -145,15 +143,13 @@ for ((i = 0; i < N; i++)) sed -i '' 's#'"${MEMO}"'#'"${MEMO_SPLIT[1]}"':'"${P2P_PORT}"'#g' ${CHAIN_0_DIR}/config/config.toml # change port of persistent_peers sed -i '' 's/pruning = "default"/pruning = "nothing"/g' ${CHAIN_DIR}/config/app.toml - sed -i '' 's#"0.0.0.0:9091"#"0.0.0.0:'"${GRPC_WEB_PORT}"'"#g' ${CHAIN_DIR}/config/app.toml sed -i '' 's#"0.0.0.0:9090"#"0.0.0.0:'"${GRPC_PORT}"'"#g' ${CHAIN_DIR}/config/app.toml fi - echo "${BINARY} instance: home ${CHAIN_DIR} | chain-id ${CHAIN_ID} | p2p=:${P2P_PORT} | rpc=:${RPC_PORT} | profiling=:${PROF_PORT} | grpc=:${GRPC_PORT} | grpc-web=:${GRPC_WEB_PORT}" + echo "${BINARY} instance: home ${CHAIN_DIR} | chain-id ${CHAIN_ID} | p2p=:${P2P_PORT} | rpc=:${RPC_PORT} | profiling=:${PROF_PORT} | grpc=:${GRPC_PORT}" RPC_PORT=`expr ${RPC_PORT} + 2` P2P_PORT=`expr ${P2P_PORT} + 2` PROF_PORT=`expr ${PROF_PORT} + 1` GRPC_PORT=`expr ${GRPC_PORT} + 2` - GRPC_WEB_PORT=`expr ${GRPC_WEB_PORT} + 2` done