Skip to content

Commit

Permalink
remove grpc-web
Browse files Browse the repository at this point in the history
  • Loading branch information
tkxkd0159 committed Jun 25, 2024
1 parent 0f02655 commit d94acd7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
27 changes: 13 additions & 14 deletions cli_test/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -128,9 +128,7 @@ var (
}
)

var (
minGasPrice = sdk.NewCoin(feeDenom, sdk.ZeroInt())
)
var minGasPrice = sdk.NewCoin(feeDenom, sdk.ZeroInt())

func init() {
testnet := false
Expand Down Expand Up @@ -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...))
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down
6 changes: 1 addition & 5 deletions init_multi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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

0 comments on commit d94acd7

Please sign in to comment.