mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 14:24:24 +00:00
blockchain -- defaultHost, dockerHostSwap
This commit is contained in:
parent
2ad8097dcb
commit
d70264adb6
@ -8,6 +8,8 @@ const constants = require('../../constants.json');
|
|||||||
const GethCommands = require('./geth_commands.js');
|
const GethCommands = require('./geth_commands.js');
|
||||||
const DevFunds = require('./dev_funds.js');
|
const DevFunds = require('./dev_funds.js');
|
||||||
|
|
||||||
|
const {defaultHost, dockerHostSwap} = require('../../utils/host');
|
||||||
|
|
||||||
/*eslint complexity: ["error", 36]*/
|
/*eslint complexity: ["error", 36]*/
|
||||||
var Blockchain = function(options) {
|
var Blockchain = function(options) {
|
||||||
this.blockchainConfig = options.blockchainConfig;
|
this.blockchainConfig = options.blockchainConfig;
|
||||||
@ -31,7 +33,7 @@ var Blockchain = function(options) {
|
|||||||
genesisBlock: this.blockchainConfig.genesisBlock || false,
|
genesisBlock: this.blockchainConfig.genesisBlock || false,
|
||||||
datadir: this.blockchainConfig.datadir || false,
|
datadir: this.blockchainConfig.datadir || false,
|
||||||
mineWhenNeeded: this.blockchainConfig.mineWhenNeeded || false,
|
mineWhenNeeded: this.blockchainConfig.mineWhenNeeded || false,
|
||||||
rpcHost: this.blockchainConfig.rpcHost || 'localhost',
|
rpcHost: dockerHostSwap(this.blockchainConfig.rpcHost) || defaultHost,
|
||||||
rpcPort: this.blockchainConfig.rpcPort || 8545,
|
rpcPort: this.blockchainConfig.rpcPort || 8545,
|
||||||
rpcCorsDomain: this.blockchainConfig.rpcCorsDomain || false,
|
rpcCorsDomain: this.blockchainConfig.rpcCorsDomain || false,
|
||||||
networkId: this.blockchainConfig.networkId || 1337,
|
networkId: this.blockchainConfig.networkId || 1337,
|
||||||
@ -44,7 +46,7 @@ var Blockchain = function(options) {
|
|||||||
bootnodes: this.blockchainConfig.bootnodes || "",
|
bootnodes: this.blockchainConfig.bootnodes || "",
|
||||||
rpcApi: (this.blockchainConfig.rpcApi || ['eth', 'web3', 'net', 'debug']),
|
rpcApi: (this.blockchainConfig.rpcApi || ['eth', 'web3', 'net', 'debug']),
|
||||||
wsRPC: (this.blockchainConfig.wsRPC === undefined) || this.blockchainConfig.wsRPC,
|
wsRPC: (this.blockchainConfig.wsRPC === undefined) || this.blockchainConfig.wsRPC,
|
||||||
wsHost: this.blockchainConfig.wsHost || 'localhost',
|
wsHost: dockerHostSwap(this.blockchainConfig.wsHost) || defaultHost,
|
||||||
wsPort: this.blockchainConfig.wsPort || 8546,
|
wsPort: this.blockchainConfig.wsPort || 8546,
|
||||||
wsOrigins: this.blockchainConfig.wsOrigins || false,
|
wsOrigins: this.blockchainConfig.wsOrigins || false,
|
||||||
wsApi: (this.blockchainConfig.wsApi || defaultWsApi),
|
wsApi: (this.blockchainConfig.wsApi || defaultWsApi),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user