rename cli and daemon binaries

This commit is contained in:
rhuairahrighairigh 2019-06-20 18:08:58 +01:00
parent ec312fefc8
commit 4ab69f33db
9 changed files with 24 additions and 24 deletions

View File

@ -33,8 +33,8 @@ const (
// default home directories for expected binaries
var (
DefaultCLIHome = os.ExpandEnv("$HOME/.gaiacli")
DefaultNodeHome = os.ExpandEnv("$HOME/.gaiad")
DefaultCLIHome = os.ExpandEnv("$HOME/.kvcli")
DefaultNodeHome = os.ExpandEnv("$HOME/.kvd")
)
// Extended ABCI application

View File

@ -53,7 +53,7 @@ func setGenesis(gapp *App, accs ...*auth.BaseAccount) error {
return nil
}
func TestGaiadExport(t *testing.T) {
func TestExport(t *testing.T) {
db := db.NewMemDB()
gapp := NewApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, 0)
setGenesis(gapp)

View File

@ -21,7 +21,7 @@ func (app *App) assertRuntimeInvariantsOnContext(ctx sdk.Context) {
if err := ir.Invar(ctx); err != nil {
panic(fmt.Errorf("invariant broken: %s\n"+
"\tCRITICAL please submit the following transaction:\n"+
"\t\t gaiacli tx crisis invariant-broken %v %v", err, ir.ModuleName, ir.Route))
"\t\t kvcli tx crisis invariant-broken %v %v", err, ir.ModuleName, ir.Route))
}
}
end := time.Now()

View File

@ -79,8 +79,8 @@ func main() {
}
rootCmd := &cobra.Command{
Use: "gaiacli",
Short: "Command line interface for interacting with gaiad",
Use: "kvcli",
Short: "Command line interface for interacting with kvd",
}
// Add --chain-id to persistent flags and mark it required

View File

@ -15,14 +15,14 @@ import (
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/kava-labs/kava/app"
gaiaInit "github.com/kava-labs/kava/init"
"github.com/cosmos/cosmos-sdk/server"
"github.com/cosmos/cosmos-sdk/store"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/kava-labs/kava/app"
gaiaInit "github.com/kava-labs/kava/init"
)
// gaiad custom flags
// kvd custom flags
const flagInvCheckPeriod = "inv-check-period"
var invCheckPeriod uint
@ -39,7 +39,7 @@ func main() {
ctx := server.NewDefaultContext()
cobra.EnableCommandSorting = false
rootCmd := &cobra.Command{
Use: "gaiad",
Use: "kvd",
Short: "Gaia Daemon (server)",
PersistentPreRunE: server.PersistentPreRunEFn(ctx),
}

View File

@ -9,11 +9,11 @@ import (
"github.com/tendermint/tendermint/libs/common"
"github.com/cosmos/cosmos-sdk/client/keys"
"github.com/kava-labs/kava/app"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/server"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth"
"github.com/kava-labs/kava/app"
)
// AddGenesisAccountCmd returns add-genesis-account cobra Command.
@ -55,7 +55,7 @@ func AddGenesisAccountCmd(ctx *server.Context, cdc *codec.Codec) *cobra.Command
genFile := config.GenesisFile()
if !common.FileExists(genFile) {
return fmt.Errorf("%s does not exist, run `gaiad init` first", genFile)
return fmt.Errorf("%s does not exist, run `kvd init` first", genFile)
}
genDoc, err := LoadGenesisDoc(cdc, genFile)

View File

@ -22,7 +22,6 @@ import (
"github.com/cosmos/cosmos-sdk/client/context"
"github.com/cosmos/cosmos-sdk/client/keys"
"github.com/cosmos/cosmos-sdk/client/utils"
"github.com/kava-labs/kava/app"
"github.com/cosmos/cosmos-sdk/codec"
kbkeys "github.com/cosmos/cosmos-sdk/crypto/keys"
"github.com/cosmos/cosmos-sdk/server"
@ -30,6 +29,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/auth"
authtxb "github.com/cosmos/cosmos-sdk/x/auth/client/txbuilder"
"github.com/cosmos/cosmos-sdk/x/staking/client/cli"
"github.com/kava-labs/kava/app"
)
var (
@ -41,14 +41,14 @@ var (
defaultMinSelfDelegation = "1"
)
// GenTxCmd builds the gaiad gentx command.
// GenTxCmd builds the kvd gentx command.
// nolint: errcheck
func GenTxCmd(ctx *server.Context, cdc *codec.Codec) *cobra.Command {
cmd := &cobra.Command{
Use: "gentx",
Short: "Generate a genesis tx carrying a self delegation",
Args: cobra.NoArgs,
Long: fmt.Sprintf(`This command is an alias of the 'gaiad tx create-validator' command'.
Long: fmt.Sprintf(`This command is an alias of the 'kvd tx create-validator' command'.
It creates a genesis piece carrying a self delegation with the
following delegation and commission default parameters:
@ -153,7 +153,7 @@ following delegation and commission default parameters:
}
if info.GetType() == kbkeys.TypeOffline || info.GetType() == kbkeys.TypeMulti {
fmt.Println("Offline key passed in. Use `gaiacli tx sign` command to sign:")
fmt.Println("Offline key passed in. Use `kvcli tx sign` command to sign:")
return utils.PrintUnsignedStdTx(txBldr, cliCtx, []sdk.Msg{msg}, true)
}

View File

@ -12,13 +12,13 @@ import (
"github.com/cosmos/cosmos-sdk/client/keys"
"github.com/cosmos/cosmos-sdk/client"
"github.com/kava-labs/kava/app"
"github.com/cosmos/cosmos-sdk/codec"
srvconfig "github.com/cosmos/cosmos-sdk/server/config"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth"
authtx "github.com/cosmos/cosmos-sdk/x/auth/client/txbuilder"
"github.com/cosmos/cosmos-sdk/x/staking"
"github.com/kava-labs/kava/app"
"github.com/spf13/cobra"
"github.com/spf13/viper"
@ -47,14 +47,14 @@ func TestnetFilesCmd(ctx *server.Context, cdc *codec.Codec) *cobra.Command {
cmd := &cobra.Command{
Use: "testnet",
Short: "Initialize files for a Gaiad testnet",
Short: "Initialize files for a testnet",
Long: `testnet will create "v" number of directories and populate each with
necessary files (private validator, genesis, config, etc.).
Note, strict routability for addresses is turned off in the config file.
Example:
gaiad testnet --v 4 --output-dir ./output --starting-ip-address 192.168.10.2
kvd testnet --v 4 --output-dir ./output --starting-ip-address 192.168.10.2
`,
RunE: func(_ *cobra.Command, _ []string) error {
config := ctx.Config
@ -71,10 +71,10 @@ Example:
cmd.Flags().String(flagNodeDirPrefix, "node",
"Prefix the directory name for each node with (node results in node0, node1, ...)",
)
cmd.Flags().String(flagNodeDaemonHome, "gaiad",
cmd.Flags().String(flagNodeDaemonHome, "kvd",
"Home directory of the node's daemon configuration",
)
cmd.Flags().String(flagNodeCliHome, "gaiacli",
cmd.Flags().String(flagNodeCliHome, "kvcli",
"Home directory of the node's cli configuration",
)
cmd.Flags().String(flagStartingIPAddress, "192.168.0.1",
@ -236,7 +236,7 @@ func initTestnet(config *tmconfig.Config, cdc *codec.Codec) error {
return err
}
gaiaConfigFilePath := filepath.Join(nodeDir, "config/gaiad.toml")
gaiaConfigFilePath := filepath.Join(nodeDir, "config/kvd.toml")
srvconfig.WriteConfigFile(gaiaConfigFilePath, gaiaConfig)
}

View File

@ -4,9 +4,9 @@ import (
"fmt"
"os"
"github.com/kava-labs/kava/app"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/server"
"github.com/kava-labs/kava/app"
"github.com/spf13/cobra"
"github.com/tendermint/tendermint/types"
)
@ -44,7 +44,7 @@ func ValidateGenesisCmd(ctx *server.Context, cdc *codec.Codec) *cobra.Command {
return fmt.Errorf("Error validating genesis file %s: %s", genesis, err.Error())
}
fmt.Printf("File at %s is a valid genesis file for gaiad\n", genesis)
fmt.Printf("File at %s is a valid genesis file for kvd\n", genesis)
return nil
},
}