mirror of https://github.com/embarklabs/embark.git
patchy mcpatchface
Signed-off-by: VoR0220 <catalanor0220@gmail.com>
This commit is contained in:
parent
acf67071c8
commit
258d9b3fe0
|
@ -22,11 +22,11 @@ class ContractFuzzer {
|
||||||
fuzzMap[name] = {};
|
fuzzMap[name] = {};
|
||||||
for (let i = 0; i < iterations; i++) {
|
for (let i = 0; i < iterations; i++) {
|
||||||
fuzzMap[name][i] = inputTypes.map(input => this.getTypeFuzz(input));
|
fuzzMap[name][i] = inputTypes.map(input => this.getTypeFuzz(input));
|
||||||
self.logger.info(name);
|
self.logger.trace(name);
|
||||||
self.logger.info("iteration: " + i + "\n" + fuzzMap[name][i]);
|
self.logger.trace("iteration: " + i + "\n" + fuzzMap[name][i]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
self.logger.info('\n');
|
self.logger.trace('\n');
|
||||||
return fuzzMap;
|
return fuzzMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ class GasEstimator {
|
||||||
async.concat(fuzzMap[name], (values, getVarianceCb) => {
|
async.concat(fuzzMap[name], (values, getVarianceCb) => {
|
||||||
contractObj.methods[name].apply(contractObj.methods[name], values)
|
contractObj.methods[name].apply(contractObj.methods[name], values)
|
||||||
.estimateGas((err, gasAmount) => {
|
.estimateGas((err, gasAmount) => {
|
||||||
getVarianceCb(err, [gasAmount]);
|
getVarianceCb(err, gasAmount);
|
||||||
});
|
});
|
||||||
}, (err, variance) => {
|
}, (err, variance) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
Loading…
Reference in New Issue