fix for no accounts on init with warning messages

This commit is contained in:
Carl Mönnig 2017-06-18 13:16:11 +02:00
parent f5b0c4d2a7
commit f38b9bc1d6
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ Blockchain.prototype.initChainAndGetAddress = function() {
// check if an account already exists, create one if not, return address // check if an account already exists, create one if not, return address
result = this.runCommand(this.client.listAccountsCommand()); 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); console.log("no accounts found".green);
if (this.config.genesisBlock) { if (this.config.genesisBlock) {
console.log("initializing genesis block".green); console.log("initializing genesis block".green);