Skip to content

Commit

Permalink
fuzzer: Enable latest stable EVM revision
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Mar 30, 2022
1 parent 8782a71 commit 76a8d7e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/fuzzer/fuzzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
#include <iostream>
#include <limits>

constexpr auto latest_rev = EVMC_ISTANBUL;


inline std::ostream& operator<<(std::ostream& os, const evmc_address& addr)
{
return os << hex({addr.bytes, sizeof(addr.bytes)});
Expand Down Expand Up @@ -230,7 +227,8 @@ fuzz_input populate_input(const uint8_t* data, size_t data_size) noexcept
if (data_size < input_size_16bits) // Not enough data for input.
return in;

in.rev = rev_4bits > latest_rev ? latest_rev : static_cast<evmc_revision>(rev_4bits);
in.rev = (rev_4bits > EVMC_LATEST_STABLE_REVISION) ? EVMC_LATEST_STABLE_REVISION :
static_cast<evmc_revision>(rev_4bits);

// The message king should not matter but this 1 bit was free.
in.msg.kind = kind_1bit ? EVMC_CREATE : EVMC_CALL;
Expand Down

0 comments on commit 76a8d7e

Please sign in to comment.