mirror of https://github.com/embarklabs/embark.git
blockchain -- defaultHost, dockerHostSwap
This commit is contained in:
parent
e5b1a58b25
commit
98318c6c05
|
@ -7,6 +7,8 @@ const utils = require('../../utils/utils.js');
|
|||
|
||||
const GethCommands = require('./geth_commands.js');
|
||||
|
||||
const {defaultHost, dockerHostSwap} = require('../../utils/host');
|
||||
|
||||
/*eslint complexity: ["error", 36]*/
|
||||
var Blockchain = function(options) {
|
||||
this.blockchainConfig = options.blockchainConfig;
|
||||
|
@ -26,7 +28,7 @@ var Blockchain = function(options) {
|
|||
genesisBlock: this.blockchainConfig.genesisBlock || false,
|
||||
datadir: this.blockchainConfig.datadir || false,
|
||||
mineWhenNeeded: this.blockchainConfig.mineWhenNeeded || false,
|
||||
rpcHost: this.blockchainConfig.rpcHost || 'localhost',
|
||||
rpcHost: dockerHostSwap(this.blockchainConfig.rpcHost) || defaultHost,
|
||||
rpcPort: this.blockchainConfig.rpcPort || 8545,
|
||||
rpcCorsDomain: this.blockchainConfig.rpcCorsDomain || false,
|
||||
networkId: this.blockchainConfig.networkId || 1337,
|
||||
|
@ -39,7 +41,7 @@ var Blockchain = function(options) {
|
|||
bootnodes: this.blockchainConfig.bootnodes || "",
|
||||
rpcApi: (this.blockchainConfig.rpcApi || ['eth', 'web3', 'net', 'debug']),
|
||||
wsRPC: (this.blockchainConfig.wsRPC === undefined) || this.blockchainConfig.wsRPC,
|
||||
wsHost: this.blockchainConfig.wsHost || 'localhost',
|
||||
wsHost: dockerHostSwap(this.blockchainConfig.wsHost) || defaultHost,
|
||||
wsPort: this.blockchainConfig.wsPort || 8546,
|
||||
wsOrigins: this.blockchainConfig.wsOrigins || false,
|
||||
wsApi: (this.blockchainConfig.wsApi || ['eth', 'web3', 'net', 'shh', 'debug']),
|
||||
|
|
Loading…
Reference in New Issue