Add host field to network

perf/memdown
cgewecke 5 years ago
parent 042cf5f29a
commit 715f019513
  1. 9
      dist/truffle.plugin.js

@ -76,11 +76,9 @@ async function plugin(truffleConfig){
//const web3 = new Web3(provider); //const web3 = new Web3(provider);
await app.provider(truffle.ganache); await app.provider(truffle.ganache);
const web3 = new Web3('http://localhost:8777'); const web3 = new Web3('http://localhost:8777');
console.log('post web3 in plugin');
const accounts = await web3.eth.getAccounts(); const accounts = await web3.eth.getAccounts();
const nodeInfo = await web3.eth.getNodeInfo(); const nodeInfo = await web3.eth.getNodeInfo();
const ganacheVersion = nodeInfo.split('/')[1]; const ganacheVersion = nodeInfo.split('/')[1];
console.log('post initial web3 calls')
app.ui.report('truffle-version', [truffle.version]); app.ui.report('truffle-version', [truffle.version]);
app.ui.report('ganache-version', [ganacheVersion]); app.ui.report('ganache-version', [ganacheVersion]);
@ -112,8 +110,9 @@ async function plugin(truffleConfig){
const networkName = 'soliditycoverage'; const networkName = 'soliditycoverage';
truffleConfig.network = networkName; truffleConfig.network = networkName;
// Truffle alternately complains that fields are and // Truffle alternately complains that fields *are*
// are not manually set // and *are not* manually set depending on the execution
// context (npm installed vs. our tests': await plugin())
try { try {
truffleConfig.network_id = "*"; truffleConfig.network_id = "*";
truffleConfig.port = 8777; truffleConfig.port = 8777;
@ -125,7 +124,7 @@ async function plugin(truffleConfig){
truffleConfig.networks[networkName] = { truffleConfig.networks[networkName] = {
network_id: "*", network_id: "*",
provider: TruffleProvider.create(truffleConfig), host: "127.0.0.1",
port: 8777, port: 8777,
gas: app.gasLimit, gas: app.gasLimit,
gasPrice: app.gasPrice, gasPrice: app.gasPrice,

Loading…
Cancel
Save