PR feedback

This commit is contained in:
Anthony Laibe 2019-01-25 09:38:00 +00:00 committed by Iuri Matias
parent e8da329d60
commit 0e01e3d846
1 changed files with 3 additions and 5 deletions

View File

@ -109,12 +109,12 @@ class BlockchainConnector {
const sim = self._getSimulator(); const sim = self._getSimulator();
const options = Object.assign({}, self.config.contractsConfig.deployment, { const options = Object.assign({}, self.config.contractsConfig.deployment, {
gasPrice: "0x01", gasPrice: "0x01",
gasLimit: "0xfffffffffffff" gasLimit: "0xfffffffffffff",
allowUnlimitedContractSize: coverage
}); });
self.provider = sim.provider(options);
if (coverage) { if (coverage) {
options.allowUnlimitedContractSize = true;
self.provider = sim.provider(options);
// Here we patch the sendAsync method on the provider. The goal behind this is to force pure/constant/view calls to become // Here we patch the sendAsync method on the provider. The goal behind this is to force pure/constant/view calls to become
// transactions, so that we can pull in execution traces and account for those executions in code coverage. // transactions, so that we can pull in execution traces and account for those executions in code coverage.
// //
@ -147,8 +147,6 @@ class BlockchainConnector {
}); });
}); });
}; };
} else {
self.provider = sim.provider(options);
} }
self.web3.setProvider(self.provider); self.web3.setProvider(self.provider);