diff --git a/libraries/chain/wasm_interface.cpp b/libraries/chain/wasm_interface.cpp index 0365fab49c678f6e656698dcc7efa5b68aaf5ac6..a8584a98d8dc9a768aae42a581e58085a9f077d5 100644 --- a/libraries/chain/wasm_interface.cpp +++ b/libraries/chain/wasm_interface.cpp @@ -20,9 +20,15 @@ namespace eos { namespace chain { std::chrono::time_point checktimeStart; +#ifdef NDEBUG + const int CHECKTIME_LIMIT = 2000; +#else + const int CHECKTIME_LIMIT = 12000; +#endif + DEFINE_INTRINSIC_FUNCTION0(env,checktime,checktime,none) { auto dur = std::chrono::duration_cast(std::chrono::system_clock::now() - checktimeStart); - if (dur.count() > 1500) { + if (dur.count() > CHECKTIME_LIMIT) { wlog("checktime called ${d}", ("d", dur.count())); throw checktime_exceeded(); } @@ -295,6 +301,8 @@ DEFINE_INTRINSIC_FUNCTION1(env,loopControl,loopControl,i32,i32,i) { std::vector invokeArgs(1); invokeArgs[0] = U32(bytes); + checktimeStart = std::chrono::system_clock::now(); + auto result = Runtime::invokeFunction(alloc_function,invokeArgs); return &memoryRef( current_memory, result.i32 );