2018-01-15 00:10:02 +00:00
|
|
|
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),
|
2018-01-20 23:45:40 +00:00
|
|
|
Name: "sharding",
|
|
|
|
Aliases: []string{"shard"},
|
2018-01-15 00:10:02 +00:00
|
|
|
Usage: "Start a sharding client",
|
|
|
|
ArgsUsage: "[endpoint]",
|
2018-01-20 17:17:59 +00:00
|
|
|
Flags: []cli.Flag{utils.DataDirFlag, utils.PasswordFileFlag, utils.NetworkIdFlag},
|
2018-01-15 00:10:02 +00:00
|
|
|
Category: "SHARDING COMMANDS",
|
|
|
|
Description: "TODO(prestonvanloon)- Add sharding client description",
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
func shardingClient(ctx *cli.Context) error {
|
|
|
|
c := sharding.MakeShardingClient(ctx)
|
|
|
|
if err := c.Start(); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
c.Wait()
|
|
|
|
return nil
|
|
|
|
}
|