make sure port is an integer, port var should hold offset port value

This commit is contained in:
Michael Bradley, Jr 2018-09-19 19:48:00 -05:00
parent ae8a59cf9b
commit 3846db79f7

View File

@ -30,8 +30,9 @@ class Simulator {
let useProxy = this.blockchainConfig.proxy || false;
let host = (dockerHostSwap(options.host || this.blockchainConfig.rpcHost) || defaultHost);
let port = (options.port || this.blockchainConfig.rpcPort || 8545);
port = parseInt(port) + (useProxy ? constants.blockchain.servicePortOnProxy : 0);
cmds.push("-p " + (port + (useProxy ? constants.blockchain.servicePortOnProxy : 0)));
cmds.push("-p " + port);
cmds.push("-h " + host);
cmds.push("-a " + (options.numAccounts || 10));
cmds.push("-e " + (options.defaultBalance || 100));