EVM-C: Update examples

This commit is contained in:
Paweł Bylica 2016-08-25 12:20:39 +02:00
parent cd72d30018
commit ff8847670d
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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;