Merge pull request #19 from nisdas/IPCPath

Add IPC Path Flag to sharding client

Former-commit-id: 44474d0f4633caadcc9287aaad4aca98881d2854 [formerly be2ad87d6f8cf2d9f0011d9c397f3541c7897183]
Former-commit-id: b5093c0c63326d847f0df32177a1ef8f7fee5466
This commit is contained in:
Preston Van Loon 2018-02-08 10:59:28 -05:00 committed by GitHub
commit 411d749b19
2 changed files with 4 additions and 1 deletions

View File

@ -14,7 +14,7 @@ var (
Aliases: []string{"shard"}, Aliases: []string{"shard"},
Usage: "Start a sharding client", Usage: "Start a sharding client",
ArgsUsage: "[endpoint]", 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", Category: "SHARDING COMMANDS",
Description: ` 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. 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 == "" { if endpoint == "" {
endpoint = fmt.Sprintf("%s/%s.ipc", path, clientIdentifier) endpoint = fmt.Sprintf("%s/%s.ipc", path, clientIdentifier)
} }
if ctx.GlobalIsSet(utils.IPCPathFlag.Name) {
endpoint = ctx.GlobalString(utils.IPCPathFlag.Name)
}
config := &node.Config{ config := &node.Config{
DataDir: path, DataDir: path,