From f38b9bc1d6601cc4067c2cb1b5de377deb367ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl=20M=C3=B6nnig?= Date: Sun, 18 Jun 2017 13:16:11 +0200 Subject: [PATCH] fix for no accounts on init with warning messages --- lib/cmds/blockchain/blockchain.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cmds/blockchain/blockchain.js b/lib/cmds/blockchain/blockchain.js index e83167bc0..f05f08a30 100644 --- a/lib/cmds/blockchain/blockchain.js +++ b/lib/cmds/blockchain/blockchain.js @@ -65,7 +65,7 @@ Blockchain.prototype.initChainAndGetAddress = function() { // check if an account already exists, create one if not, return address result = this.runCommand(this.client.listAccountsCommand()); - if (result.output === undefined || result.output === '' || result.output.indexOf("Fatal") >= 0) { + if (result.output === undefined || result.output.match(/{(\w+)}/) === null || result.output.indexOf("Fatal") >= 0) { console.log("no accounts found".green); if (this.config.genesisBlock) { console.log("initializing genesis block".green);