aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCJentzsch <jentzsch.software@gmail.com>2015-03-18 23:32:33 +0800
committerCJentzsch <jentzsch.software@gmail.com>2015-03-18 23:32:33 +0800
commit4dbb6b67d6796bfec1e2396470fe926a77b490f5 (patch)
treef9a372edcf5db23b9797d4ad402b36b57b71f742
parent9c33d18711b4c79aa0b013271a440b67cee8a3ec (diff)
downloaddexon-solidity-4dbb6b67d6796bfec1e2396470fe926a77b490f5.tar.gz
dexon-solidity-4dbb6b67d6796bfec1e2396470fe926a77b490f5.tar.zst
dexon-solidity-4dbb6b67d6796bfec1e2396470fe926a77b490f5.zip
less magic
-rw-r--r--createRandomStateTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/createRandomStateTest.cpp b/createRandomStateTest.cpp
index 6cfad509..5a3719f2 100644
--- a/createRandomStateTest.cpp
+++ b/createRandomStateTest.cpp
@@ -55,11 +55,12 @@ int main(int argc, char *argv[])
auto now = chrono::steady_clock::now().time_since_epoch();
auto timeSinceEpoch = chrono::duration_cast<chrono::nanoseconds>(now).count();
gen.seed(static_cast<unsigned int>(timeSinceEpoch));
+ // set min and max length of the random evm code
boost::random::uniform_int_distribution<> lengthOfCodeDist(8, 24);
boost::random::uniform_int_distribution<> reasonableInputValuesSize(0, 7);
boost::random::uniform_int_distribution<> opcodeDist(0, 255);
boost::random::uniform_int_distribution<> BlockInfoOpcodeDist(0x40, 0x45);
- boost::random::uniform_int_distribution<> uniformInt(0, 2147483647);
+ boost::random::uniform_int_distribution<> uniformInt(0, 0x7fffffff);
boost::random::variate_generator<boost::mt19937&, boost::random::uniform_int_distribution<> > randGenInputValue(gen, reasonableInputValuesSize);
boost::random::variate_generator<boost::mt19937&, boost::random::uniform_int_distribution<> > randGenUniformInt(gen, uniformInt);
boost::random::variate_generator<boost::mt19937&, boost::random::uniform_int_distribution<> > randGen(gen, opcodeDist);