From a29d78cc5a2560891b9b7faca957083fff68df5a Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Sun, 15 Jul 2018 10:12:18 -0500 Subject: [PATCH] simulator -- defaultHost, dockerHostSwap --- lib/cmds/simulator.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cmds/simulator.js b/lib/cmds/simulator.js index 31024c73..27d03926 100644 --- a/lib/cmds/simulator.js +++ b/lib/cmds/simulator.js @@ -2,6 +2,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) { @@ -15,7 +16,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)));