Merge pull request #5874 from ethereum/fuzzer-optim

Run constant optimiser on fresh inputs in the fuzzer
This commit is contained in:
chriseth
2019-01-28 11:57:38 +01:00
committed by GitHub
+3 -1
View File
@@ -95,12 +95,14 @@ void FuzzerUtil::testConstantOptimizer(string const& _input, bool _quiet)
for (bool isCreation: {false, true})
for (unsigned runs: {1, 2, 3, 20, 40, 100, 200, 400, 1000})
{
// Make a copy here so that each time we start with the original state.
Assembly tmp = assembly;
ConstantOptimisationMethod::optimiseConstants(
isCreation,
runs,
EVMVersion{},
assembly,
const_cast<AssemblyItems &>(assembly.items())
const_cast<AssemblyItems &>(tmp.items())
);
}
}