diff --git a/examples/capi.c b/examples/capi.c index 65ad252..5b2cce7 100644 --- a/examples/capi.c +++ b/examples/capi.c @@ -80,7 +80,7 @@ int main(int argc, char *argv[]) { sizeof(input), value); printf("Execution result:\n"); - if (result.outcome == EVM_RESULT_EXCEPTION) { + if (result.outcome == EVM_EXCEPTION) { printf(" EVM exception\n"); } printf(" Gas used: %ld\n", gas - result.gas_left); diff --git a/examples/examplevm.c b/examples/examplevm.c index 5697ead..3c2078e 100644 --- a/examples/examplevm.c +++ b/examples/examplevm.c @@ -67,7 +67,7 @@ static struct evm_result evm_execute(struct evm_instance* instance, // Execute code and refer to callbacks: instance->query_fn() - ret.outcome = EVM_RESULT_EXCEPTION; + ret.outcome = EVM_EXCEPTION; ret.gas_left = 0; return ret; diff --git a/include/evm.h b/include/evm.h index fe7ab14..454843c 100644 --- a/include/evm.h +++ b/include/evm.h @@ -61,13 +61,13 @@ struct evm_hash256 { /// The outcome of an execution. enum evm_result_outcome { - EVM_RESULT_SUCCESS = 0, - EVM_RESULT_OUT_OF_GAS = 1, - EVM_RESULT_BAD_INSTRUCTION = 2, - EVM_RESULT_BAD_JUMP_DESTINATION = 3, - EVM_RESULT_STACK_OVERFLOW = 4, - EVM_RESULT_STACK_UNDERFLOW = 5, - EVM_RESULT_EXCEPTION = 6 + EVM_SUCCESS = 0, + EVM_OUT_OF_GAS = 1, + EVM_BAD_INSTRUCTION = 2, + EVM_BAD_JUMP_DESTINATION = 3, + EVM_STACK_OVERFLOW = 4, + EVM_STACK_UNDERFLOW = 5, + EVM_EXCEPTION = 6 }; /// Complex struct representing execution result.