mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-25 22:49:01 +00:00
simulator -- defaultHost, dockerHostSwap
This commit is contained in:
parent
000a10b375
commit
2ad8097dcb
@ -2,6 +2,7 @@ let shelljs = require('shelljs');
|
|||||||
let proxy = require('../core/proxy');
|
let proxy = require('../core/proxy');
|
||||||
const Ipc = require('../core/ipc');
|
const Ipc = require('../core/ipc');
|
||||||
const constants = require('../constants.json');
|
const constants = require('../constants.json');
|
||||||
|
const {defaultHost, dockerHostSwap} = require('../utils/host');
|
||||||
|
|
||||||
class Simulator {
|
class Simulator {
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
@ -21,7 +22,7 @@ class Simulator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let useProxy = this.blockchainConfig.proxy || false;
|
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);
|
let port = (options.port || this.blockchainConfig.rpcPort || 8545);
|
||||||
|
|
||||||
cmds.push("-p " + (port + (useProxy ? constants.blockchain.servicePortOnProxy : 0)));
|
cmds.push("-p " + (port + (useProxy ? constants.blockchain.servicePortOnProxy : 0)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user