Add IPC Path Flag to sharding client

Former-commit-id: 7d596e8ef95e71f7381dc27b25e1a4a2c0fa9a47 [formerly 76650eb37ce1755839ed23d8b1fe36d2dbdadffd]
Former-commit-id: b518e5a1de2615dbf5d16a819b057920df65dc60
This commit is contained in:
nisdas 2018-02-07 15:52:42 +08:00
parent 887a4865d2
commit 573a22986e
2 changed files with 4 additions and 1 deletions

View File

@ -14,7 +14,7 @@ var (
Aliases: []string{"shard"},
Usage: "Start a sharding client",
ArgsUsage: "[endpoint]",
Flags: []cli.Flag{utils.DataDirFlag, utils.PasswordFileFlag, utils.NetworkIdFlag},
Flags: []cli.Flag{utils.DataDirFlag, utils.PasswordFileFlag, utils.NetworkIdFlag,utils.IPCPathFlag},
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.

View File

@ -45,6 +45,9 @@ func MakeShardingClient(ctx *cli.Context) *Client {
if endpoint == "" {
endpoint = fmt.Sprintf("%s/%s.ipc", path, clientIdentifier)
}
if ctx.GlobalIsSet(utils.IPCPathFlag.Name) {
endpoint = ctx.GlobalString(utils.IPCPathFlag.Name)
}
config := &node.Config{
DataDir: path,