mirror of https://github.com/embarklabs/embark.git
simulator -- defaultHost, dockerHostSwap
This commit is contained in:
parent
51ccea63c4
commit
e5b1a58b25
|
@ -3,6 +3,7 @@ let shelljs = require('shelljs');
|
|||
let proxy = require('../core/proxy');
|
||||
const Ipc = require('../core/ipc');
|
||||
const constants = require('../constants.json');
|
||||
const {defaultHost, dockerHostSwap} = require('../utils/host');
|
||||
|
||||
class Simulator {
|
||||
constructor(options) {
|
||||
|
@ -16,7 +17,7 @@ class Simulator {
|
|||
const ganache = path.join(__dirname, '../../node_modules/.bin/ganache-cli');
|
||||
|
||||
let useProxy = this.blockchainConfig.proxy || false;
|
||||
let host = (options.host || this.blockchainConfig.rpcHost || 'localhost');
|
||||
let host = (dockerHostSwap(options.host || this.blockchainConfig.rpcHost) || defaultHost);
|
||||
let port = (options.port || this.blockchainConfig.rpcPort || 8545);
|
||||
|
||||
cmds.push("-p " + (port + (useProxy ? constants.blockchain.servicePortOnProxy : 0)));
|
||||
|
|
Loading…
Reference in New Issue