prysm-pulse/cmd/geth/shardingcmd.go
nisdas 3259e3616a Add Join Validator Flag
Former-commit-id: 1c881038a2a42bc677ed9a8b04f206952d385d62 [formerly c0e94478b985e3df5bb2a714695101bddc2d9388]
Former-commit-id: 05244e6d66e996a6d46ca3272ef6d52d4fee3b78
2018-02-25 18:04:38 +08:00

51 lines
1.4 KiB
Go

package main
import (
"github.com/ethereum/go-ethereum/sharding"
"github.com/ethereum/go-ethereum/cmd/utils"
cli "gopkg.in/urfave/cli.v1"
)
var (
shardingClientCommand = cli.Command{
Action: utils.MigrateFlags(shardingClient),
Name: "sharding",
Aliases: []string{"shard"},
Usage: "Start a sharding client",
ArgsUsage: "[endpoint]",
Flags: []cli.Flag{utils.DataDirFlag, utils.PasswordFileFlag, utils.NetworkIdFlag, utils.IPCPathFlag,utils.ValidatorSetFlag},
Category: "SHARDING COMMANDS",
Description: `
Launches a sharding client that connects to a running geth node and proposes collations to a Validator Manager Contract. This feature is a work in progress.
`,
/* Subcommands: []cli.Command{
{
Name: "joinvalidatorset",
Usage: "Join validator set",
Aliases: []string{"validate"},
ArgsUsage: "",
Action: utils.MigrateFlags(joinValidatorSet),
Category: "SHARDING COMMANDS",
Description: `
Participate in validator set, client will deposit 100ETH from user's account into VMC validator set, which can be withdrawn at any time. This feature is a work in progress.
`,
},
},*/
}
)
func shardingClient(ctx *cli.Context) error {
c := sharding.MakeShardingClient(ctx)
if err := c.Start(); err != nil {
return err
}
c.Wait()
return nil
}
/*func joinValidatorSet(ctx *cli.Context) error {
fmt.Println("Testing")
return nil
}*/