aboutsummaryrefslogtreecommitdiffstats
path: root/createRandomTest.cpp
diff options
context:
space:
mode:
authorCJentzsch <jentzsch.software@gmail.com>2015-01-13 16:53:46 +0800
committerCJentzsch <jentzsch.software@gmail.com>2015-01-13 16:53:46 +0800
commitb1ddaed08a31fc413e492c9af968b9944c7160f4 (patch)
tree630ff8be7f48596b90f9863238ab46241916fa18 /createRandomTest.cpp
parent9ee474b139a4d983fcd67006d4955c0d9261a0d1 (diff)
downloaddexon-solidity-b1ddaed08a31fc413e492c9af968b9944c7160f4.tar
dexon-solidity-b1ddaed08a31fc413e492c9af968b9944c7160f4.tar.gz
dexon-solidity-b1ddaed08a31fc413e492c9af968b9944c7160f4.tar.bz2
dexon-solidity-b1ddaed08a31fc413e492c9af968b9944c7160f4.tar.lz
dexon-solidity-b1ddaed08a31fc413e492c9af968b9944c7160f4.tar.xz
dexon-solidity-b1ddaed08a31fc413e492c9af968b9944c7160f4.tar.zst
dexon-solidity-b1ddaed08a31fc413e492c9af968b9944c7160f4.zip
reinclude invalid opcode in random tests
Diffstat (limited to 'createRandomTest.cpp')
-rw-r--r--createRandomTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/createRandomTest.cpp b/createRandomTest.cpp
index d9638ceb..d2522cf4 100644
--- a/createRandomTest.cpp
+++ b/createRandomTest.cpp
@@ -54,7 +54,7 @@ int main(int argc, char *argv[])
gen.seed(static_cast<unsigned int>(timeSinceEpoch));
boost::random::uniform_int_distribution<> lengthOfCodeDist(2, 16);
boost::random::uniform_int_distribution<> opcodeDist(0, 255);
- boost::random::uniform_int_distribution<> BlockInfoOpcodeDist(0x41, 0x45);
+ boost::random::uniform_int_distribution<> BlockInfoOpcodeDist(0x40, 0x45);
boost::random::variate_generator<boost::mt19937&,
boost::random::uniform_int_distribution<> > randGen(gen, opcodeDist);
boost::random::variate_generator<boost::mt19937&,
@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
uint8_t opcode = randGen();
// disregard all invalid commands, except of one (0x0c)
- if (dev::eth::isValidInstruction(dev::eth::Instruction(opcode)) || opcode == 0x0a)
+ if ((dev::eth::isValidInstruction(dev::eth::Instruction(opcode)) || (opcode == 0x0c)))
randomCode += toHex(toCompactBigEndian(opcode));
else
i--;
@@ -87,7 +87,7 @@ int main(int argc, char *argv[])
\"currentNumber\" : \"0\",\n\
\"currentGasLimit\" : \"1000000\",\n\
\"currentDifficulty\" : \"115792089237316195423570985008687907853269984665640564039457584007913129639935\",\n\
- \"currentTimestamp\" : 2,\n\
+ \"currentTimestamp\" : 5,\n\
\"currentCoinbase\" : \"2adc25665018aa1fe0e6bc666dac8fc2697ff9ba\"\n\
},\n\
\"pre\" : {\n\