mirror of https://github.com/status-im/evmc.git
Make tracing feature optional
This commit is contained in:
parent
d2ac75f6a8
commit
9e31e93fec
|
@ -789,7 +789,11 @@ struct evmc_instance
|
|||
/** Pointer to function executing a code by the EVM instance. */
|
||||
evmc_execute_fn execute;
|
||||
|
||||
/** Pointer to function setting the EVM instruction tracer. */
|
||||
/**
|
||||
* Optional pointer to function setting the EVM instruction tracer.
|
||||
*
|
||||
* If the EVM does not support this feature the pointer can be NULL.
|
||||
*/
|
||||
evmc_set_tracer_fn set_tracer;
|
||||
|
||||
/**
|
||||
|
|
|
@ -66,6 +66,6 @@ TEST_F(evmc_vm_test, set_tracer)
|
|||
static constexpr auto tracer_callback = [](evmc_tracer_context*, int, size_t, evmc_status_code,
|
||||
int64_t, size_t, const evmc_uint256be*, size_t,
|
||||
size_t, size_t, const uint8_t*) noexcept {};
|
||||
ASSERT_NE(vm->set_tracer, nullptr);
|
||||
vm->set_tracer(vm, tracer_callback, nullptr);
|
||||
if (vm->set_tracer)
|
||||
vm->set_tracer(vm, tracer_callback, nullptr);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue