Merge pull request #278 from carlmon/develop
fix for no accounts on init with warning messages
This commit is contained in:
commit
1e306f0ad1
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue