Rename EVMC_LATEST_REVISION to EVMC_MAX_REVISION

This commit is contained in:
Paweł Bylica 2019-01-18 14:17:19 +01:00
parent 602cc230f2
commit d4fc289c80
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
4 changed files with 9 additions and 9 deletions

View File

@ -1,6 +1,6 @@
/* EVMC: Ethereum Client-VM Connector API.
* Copyright 2018 The EVMC Authors.
* Licensed under the Apache License, Version 2.0. See the LICENSE file.
* Copyright 2019 The EVMC Authors.
* Licensed under the Apache License, Version 2.0.
*/
/** This example shows how to use evmc::instructions library from evmc CMake package. */
@ -9,6 +9,5 @@
int main()
{
return evmc_get_instruction_metrics_table(EVMC_LATEST_REVISION)[OP_STOP]
.num_stack_returned_items;
return evmc_get_instruction_metrics_table(EVMC_BYZANTIUM)[OP_STOP].num_stack_returned_items;
}

View File

@ -2,8 +2,8 @@
* EVMC: Ethereum Client-VM Connector API
*
* @copyright
* Copyright 2018 The EVMC Authors.
* Licensed under the Apache License, Version 2.0. See the LICENSE file.
* Copyright 2019 The EVMC Authors.
* Licensed under the Apache License, Version 2.0.
*
* @defgroup EVMC EVMC
* @{
@ -708,7 +708,8 @@ enum evmc_revision
EVMC_CONSTANTINOPLE = 5,
EVMC_ISTANBUL = 6,
EVMC_LATEST_REVISION = EVMC_ISTANBUL /**< This is the maximum revision number supported. */
/** The maximum EVM revision supported. */
EVMC_MAX_REVISION = EVMC_ISTANBUL
};

View File

@ -113,7 +113,7 @@ TEST(instructions, constantinople_hard_fork)
TEST(instructions, name_gas_cost_equivalence)
{
for (auto rev = EVMC_FRONTIER; rev <= EVMC_LATEST_REVISION;
for (auto rev = EVMC_FRONTIER; rev <= EVMC_MAX_REVISION;
rev = static_cast<evmc_revision>(rev + 1))
{
const auto names = evmc_get_instruction_names_table(rev);

View File

@ -41,7 +41,7 @@ TEST_F(evmc_vm_test, execute)
std::array<uint8_t, 2> code = {{0xfe, 0x00}};
evmc_result result =
vm->execute(vm, context, EVMC_LATEST_REVISION, &msg, code.data(), code.size());
vm->execute(vm, context, EVMC_MAX_REVISION, &msg, code.data(), code.size());
// Validate some constraints
if (result.status_code != EVMC_SUCCESS && result.status_code != EVMC_REVERT)