mirror of https://github.com/status-im/evmc.git
EVM-C: Update examples
This commit is contained in:
parent
cd72d30018
commit
ff8847670d
|
@ -80,8 +80,8 @@ int main(int argc, char *argv[]) {
|
|||
sizeof(input), value);
|
||||
|
||||
printf("Execution result:\n");
|
||||
if (result.outcome != EVM_SUCCESS) {
|
||||
printf(" EVM execution failure: %d\n", result.outcome);
|
||||
if (result.error_code != EVM_SUCCESS) {
|
||||
printf(" EVM execution failure: %d\n", result.error_code);
|
||||
} else {
|
||||
printf(" Gas used: %ld\n", gas - result.gas_left);
|
||||
printf(" Gas left: %ld\n", result.gas_left);
|
||||
|
|
|
@ -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_EXCEPTION;
|
||||
ret.error_code = EVM_FAILURE;
|
||||
ret.gas_left = 0;
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue