mirror of https://github.com/embarklabs/embark.git
add support for the bootnodes config
This commit is contained in:
parent
566812696d
commit
eb36af87b0
|
@ -33,6 +33,6 @@
|
|||
"rpcPort": 8545,
|
||||
"datadir": "yourdatadir",
|
||||
"networkId": "123",
|
||||
"nodes": []
|
||||
"bootnodes": ""
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,6 @@
|
|||
"rpcPort": 8545,
|
||||
"datadir": "yourdatadir",
|
||||
"networkId": "123",
|
||||
"nodes": []
|
||||
"bootnodes": ""
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,8 @@ var Blockchain = function(blockchainConfig, Client) {
|
|||
mine: this.blockchainConfig.mine || false,
|
||||
account: this.blockchainConfig.account || {},
|
||||
whisper: (this.blockchainConfig.whisper === undefined) || this.blockchainConfig.whisper,
|
||||
maxpeers: ((this.blockchainConfig.maxpeers === 0) ? 0 : (this.blockchainConfig.maxpeers || 25))
|
||||
maxpeers: ((this.blockchainConfig.maxpeers === 0) ? 0 : (this.blockchainConfig.maxpeers || 25)),
|
||||
bootnodes: this.blockchainConfig.bootnodes || ""
|
||||
};
|
||||
|
||||
this.client = new Client({config: this.config});
|
||||
|
|
|
@ -80,6 +80,10 @@ GethCommands.prototype.mainCommand = function(address) {
|
|||
cmd += "--mine ";
|
||||
}
|
||||
|
||||
if (config.bootnodes && config.bootnodes !== "" && config.bootnodes !== []) {
|
||||
cmd += "--bootnodes " + config.bootnodes;
|
||||
}
|
||||
|
||||
if (config.whisper) {
|
||||
cmd += "--shh ";
|
||||
rpc_api.push('shh');
|
||||
|
|
|
@ -25,7 +25,8 @@ describe('embark.Blockchain', function() {
|
|||
maxpeers: 25,
|
||||
mine: false,
|
||||
whisper: true,
|
||||
account: {}
|
||||
account: {},
|
||||
bootnodes: ""
|
||||
};
|
||||
var blockchain = Blockchain(config, 'geth');
|
||||
|
||||
|
@ -49,7 +50,8 @@ describe('embark.Blockchain', function() {
|
|||
maxpeers: 25,
|
||||
mine: true,
|
||||
whisper: false,
|
||||
account: {}
|
||||
account: {},
|
||||
bootnodes: ""
|
||||
};
|
||||
var blockchain = Blockchain(config, 'geth');
|
||||
|
||||
|
|
|
@ -33,6 +33,6 @@
|
|||
"rpcPort": 8545,
|
||||
"datadir": "yourdatadir",
|
||||
"networkId": "123",
|
||||
"nodes": []
|
||||
"bootnodes": ""
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue