From 4dbb6b67d6796bfec1e2396470fe926a77b490f5 Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Wed, 18 Mar 2015 16:32:33 +0100 Subject: [PATCH] less magic --- createRandomStateTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/createRandomStateTest.cpp b/createRandomStateTest.cpp index 6cfad5095..5a3719f2b 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(now).count(); gen.seed(static_cast(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 > randGenInputValue(gen, reasonableInputValuesSize); boost::random::variate_generator > randGenUniformInt(gen, uniformInt); boost::random::variate_generator > randGen(gen, opcodeDist);