[m] Setting up network id for simulator from blockchainConfig or options.
This commit is contained in:
parent
a834ca71de
commit
b9cd0cf74e
|
@ -60,6 +60,13 @@ class Simulator {
|
||||||
cmds.push("-b \"" + (simulatorBlocktime) +"\"");
|
cmds.push("-b \"" + (simulatorBlocktime) +"\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Setting up network id for simulator from blockchainConfig or options.
|
||||||
|
// Otherwise ganache-cli would make random network id.
|
||||||
|
let networkId = this.blockchainConfig.networkId || options.networkId;
|
||||||
|
if (typeof networkId != 'undefined') {
|
||||||
|
cmds.push("--networkId " + networkId);
|
||||||
|
}
|
||||||
|
|
||||||
const programName = 'ganache-cli';
|
const programName = 'ganache-cli';
|
||||||
const program = ganache;
|
const program = ganache;
|
||||||
console.log(`running: ${programName} ${cmds.join(' ')}`);
|
console.log(`running: ${programName} ${cmds.join(' ')}`);
|
||||||
|
|
Loading…
Reference in New Issue