mirror of
https://github.com/status-im/evmc.git
synced 2025-02-24 00:48:09 +00:00
Rename EVMC_LATEST_REVISION to EVMC_MAX_REVISION
This commit is contained in:
parent
602cc230f2
commit
d4fc289c80
@ -1,6 +1,6 @@
|
|||||||
/* EVMC: Ethereum Client-VM Connector API.
|
/* EVMC: Ethereum Client-VM Connector API.
|
||||||
* Copyright 2018 The EVMC Authors.
|
* Copyright 2019 The EVMC Authors.
|
||||||
* Licensed under the Apache License, Version 2.0. See the LICENSE file.
|
* Licensed under the Apache License, Version 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** This example shows how to use evmc::instructions library from evmc CMake package. */
|
/** This example shows how to use evmc::instructions library from evmc CMake package. */
|
||||||
@ -9,6 +9,5 @@
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
return evmc_get_instruction_metrics_table(EVMC_LATEST_REVISION)[OP_STOP]
|
return evmc_get_instruction_metrics_table(EVMC_BYZANTIUM)[OP_STOP].num_stack_returned_items;
|
||||||
.num_stack_returned_items;
|
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
* EVMC: Ethereum Client-VM Connector API
|
* EVMC: Ethereum Client-VM Connector API
|
||||||
*
|
*
|
||||||
* @copyright
|
* @copyright
|
||||||
* Copyright 2018 The EVMC Authors.
|
* Copyright 2019 The EVMC Authors.
|
||||||
* Licensed under the Apache License, Version 2.0. See the LICENSE file.
|
* Licensed under the Apache License, Version 2.0.
|
||||||
*
|
*
|
||||||
* @defgroup EVMC EVMC
|
* @defgroup EVMC EVMC
|
||||||
* @{
|
* @{
|
||||||
@ -708,7 +708,8 @@ enum evmc_revision
|
|||||||
EVMC_CONSTANTINOPLE = 5,
|
EVMC_CONSTANTINOPLE = 5,
|
||||||
EVMC_ISTANBUL = 6,
|
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
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ TEST(instructions, constantinople_hard_fork)
|
|||||||
|
|
||||||
TEST(instructions, name_gas_cost_equivalence)
|
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))
|
rev = static_cast<evmc_revision>(rev + 1))
|
||||||
{
|
{
|
||||||
const auto names = evmc_get_instruction_names_table(rev);
|
const auto names = evmc_get_instruction_names_table(rev);
|
||||||
|
@ -41,7 +41,7 @@ TEST_F(evmc_vm_test, execute)
|
|||||||
std::array<uint8_t, 2> code = {{0xfe, 0x00}};
|
std::array<uint8_t, 2> code = {{0xfe, 0x00}};
|
||||||
|
|
||||||
evmc_result result =
|
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
|
// Validate some constraints
|
||||||
if (result.status_code != EVMC_SUCCESS && result.status_code != EVMC_REVERT)
|
if (result.status_code != EVMC_SUCCESS && result.status_code != EVMC_REVERT)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user