From 6bf4bea4240fd34ab21e1aeb7313fd139caffd3b Mon Sep 17 00:00:00 2001 From: Varunram Date: Mon, 3 Dec 2018 12:29:51 -0500 Subject: [PATCH] connect if adr is empty as well --- cmd/lit-af/lit-af.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/lit-af/lit-af.go b/cmd/lit-af/lit-af.go index 03cc1f39b..2008990f1 100644 --- a/cmd/lit-af/lit-af.go +++ b/cmd/lit-af/lit-af.go @@ -163,6 +163,13 @@ func (lc *litAfClient) litAfSetup(conf litAfConfig) error { if err != nil { logging.Fatal(err.Error()) } + } else if len(adr) == 0 { + // so the user didn't provide us with an address to connect to + // we need to connect to the locally running lit-af instance + lc.RPCClient, err = litrpc.NewLocalLndcRpcClientWithHomeDirAndPort(defaultDir, port) + if err != nil { + logging.Fatal(err.Error()) + } } return nil }