diff --git a/brownie/network/main.py b/brownie/network/main.py index ff3d6f53c..2ee1cafc8 100644 --- a/brownie/network/main.py +++ b/brownie/network/main.py @@ -47,7 +47,9 @@ def connect(network: str = None, launch_rpc: bool = True) -> None: ) rpc.attach(host) else: - rpc.launch(active["cmd"], **active["cmd_settings"]) + cmd_args = active["cmd_settings"] + cmd_args["host"] = active["host"].replace("http://", "") + rpc.launch(active["cmd"], **cmd_args) else: Accounts()._reset() if CONFIG.network_type == "live" or CONFIG.settings["dev_deployment_artifacts"]: diff --git a/brownie/network/rpc/ganache.py b/brownie/network/rpc/ganache.py index 75b1cb410..af26a4a7d 100644 --- a/brownie/network/rpc/ganache.py +++ b/brownie/network/rpc/ganache.py @@ -18,6 +18,7 @@ CLI_FLAGS = { "7": { + "host": "--server.host", "port": "--server.port", "gas_limit": "--miner.blockGasLimit", "accounts": "--wallet.totalAccounts", @@ -35,6 +36,7 @@ "unlimited_contract_size": "--chain.allowUnlimitedContractSize", }, "<=6": { + "host": "--host", "port": "--port", "gas_limit": "--gasLimit", "accounts": "--accounts", @@ -166,6 +168,7 @@ def _validate_cmd_settings(cmd_settings: dict) -> dict: ganache_keys = set(k for f in CLI_FLAGS.values() for k in f.keys()) CMD_TYPES = { + "host": str, "port": int, "gas_limit": int, "block_time": int,