cmd/bzzd: ethapi param not mandatory. Warning if no blockchain

This commit is contained in:
zelig 2016-11-28 09:19:16 +01:00
parent b448e70c00
commit 62279e46f4

View file

@ -176,7 +176,11 @@ func registerBzzService(ctx *cli.Context, stack *node.Node) {
}
boot := func(ctx *node.ServiceContext) (node.Service, error) {
client, err := ethclient.Dial(ethapi)
if ethapi == "" {
err = fmt.Errorf("use ethapi flag to connect to a an eth client and talk to the blockchain")
} else {
client, err := ethclient.Dial(ethapi)
}
if err != nil {
utils.Fatalf("Can't connect: %v", err)
}