Skip to content

Commit 2ad8097

Browse files
simulator -- defaultHost, dockerHostSwap
1 parent 000a10b commit 2ad8097

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/cmds/simulator.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ let shelljs = require('shelljs');
22
let proxy = require('../core/proxy');
33
const Ipc = require('../core/ipc');
44
const constants = require('../constants.json');
5+
const {defaultHost, dockerHostSwap} = require('../utils/host');
56

67
class Simulator {
78
constructor(options) {
@@ -21,7 +22,7 @@ class Simulator {
2122
}
2223

2324
let useProxy = this.blockchainConfig.proxy || false;
24-
let host = (options.host || this.blockchainConfig.rpcHost || 'localhost');
25+
let host = (dockerHostSwap(options.host || this.blockchainConfig.rpcHost) || defaultHost);
2526
let port = (options.port || this.blockchainConfig.rpcPort || 8545);
2627

2728
cmds.push("-p " + (port + (useProxy ? constants.blockchain.servicePortOnProxy : 0)));

0 commit comments

Comments
 (0)