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{
|
2018-01-21 00:07:41 +00:00
|
|
|
Action: utils.MigrateFlags(shardingClient),
|
|
|
|
Name: "sharding",
|
|
|
|
Aliases: []string{"shard"},
|
|
|
|
Usage: "Start a sharding client",
|
|
|
|
ArgsUsage: "[endpoint]",
|
2018-02-27 02:07:09 +00:00
|
|
|
Flags: []cli.Flag{utils.DataDirFlag, utils.PasswordFileFlag, utils.NetworkIdFlag, utils.IPCPathFlag, utils.JoinValidatorSetFlag},
|
2018-01-21 00:07:41 +00:00
|
|
|
Category: "SHARDING COMMANDS",
|
|
|
|
Description: `
|
2018-02-06 20:08:28 +00:00
|
|
|
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.
|
2018-01-21 00:07:41 +00:00
|
|
|
`,
|
2018-01-15 00:10:02 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
func shardingClient(ctx *cli.Context) error {
|
|
|
|
c := sharding.MakeShardingClient(ctx)
|
|
|
|
if err := c.Start(); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
c.Wait()
|
|
|
|
return nil
|
|
|
|
}
|