From 62279e46f41cbc28c71806d8d00c35fbca45fe56 Mon Sep 17 00:00:00 2001 From: zelig Date: Mon, 28 Nov 2016 09:19:16 +0100 Subject: [PATCH] cmd/bzzd: ethapi param not mandatory. Warning if no blockchain --- cmd/bzzd/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/bzzd/main.go b/cmd/bzzd/main.go index 21ee47a7b5..6d006446d3 100644 --- a/cmd/bzzd/main.go +++ b/cmd/bzzd/main.go @@ -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) }