Skip to content

Commit

Permalink
Abort on unknown eosevm version
Browse files Browse the repository at this point in the history
  • Loading branch information
elmato committed Jan 18, 2024
1 parent 2a480c9 commit 0e80c10
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion eosevm/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ inline evmc_revision version_to_evmc_revision(uint64_t version) {
switch (version) {
case 0: return EVMC_ISTANBUL;
case 1: return EVMC_ISTANBUL;
default: return EVMC_ISTANBUL;
}
auto msg = "Unknown EOSEVM version: " + std::to_string(version);
#ifdef ANTELOPE
eosio::check(false, msg.c_str());
#else
silkworm::abort_due_to_assertion_failure(msg.c_str(), __FILE__, __LINE__);
#endif
return static_cast<evmc_revision>(0);
}

} // namespace eosevm

0 comments on commit 0e80c10

Please sign in to comment.