Merge pull request #70 from ethereum/tracer-helper

Add evmc_set_tracer helper
This commit is contained in:
Paweł Bylica 2018-08-20 16:36:25 +02:00 committed by GitHub
commit bae63c1a9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -49,6 +49,19 @@ static inline int evmc_set_option(struct evmc_instance* instance,
return 0;
}
/**
* Sets the tracer callback for the VM instance, if the feature is supported by the VM.
*
* @see evmc_set_tracer_fn
*/
static inline void evmc_set_tracer(struct evmc_instance* instance,
evmc_trace_callback callback,
struct evmc_tracer_context* context)
{
if (instance->set_tracer)
instance->set_tracer(instance, callback, context);
}
/**
* Executes code in the VM instance.
*