bug fixes

This commit is contained in:
Richard Holland
2024-04-22 17:50:05 +10:00
committed by RichardAH
parent 71a6f9c4d5
commit 54c00d0364
2 changed files with 6 additions and 7 deletions

View File

@@ -948,9 +948,6 @@ public:
JS_AddIntrinsicBigInt(ctx);
JS_SetMaxStackSize(rt, 65535);
JS_SetMemoryLimit(rt, 16 * 1024 * 1024);
JS_AddIntrinsicBaseObjects(ctx);
JS_AddIntrinsicJSON(ctx);
JS_AddIntrinsicBigInt(ctx);
ADD_JS_FUNCTION(_g, ctx);
ADD_JS_FUNCTION(accept, ctx);
@@ -1096,7 +1093,7 @@ public:
JS_FreeCString(ctx, str);
}
JS_FreeValue(ctx, val);
JS_FreeValue(ctx, obj);
//JS_FreeValue(ctx, obj);
return retval;
}
@@ -1120,7 +1117,7 @@ public:
}
JS_FreeValue(ctx, val);
JS_FreeValue(ctx, obj);
//JS_FreeValue(ctx, obj);
return retval;
}

View File

@@ -477,7 +477,8 @@ SetHook::validateHookSetEntry(SetHookCtx& ctx, STObject const& hookSetObj)
return false;
}
return true;
// RHTODO: fix
return std::pair<uint64_t,uint64_t>{1,1};
}
if (version == 0)
@@ -769,6 +770,7 @@ SetHook::preflight(PreflightContext const& ctx)
}
catch (std::exception& e)
{
std::cout << "Exception: " << e.what() << "\n";
JLOG(ctx.j.trace())
<< "HookSet(" << hook::log::WASM_VALIDATION << ")[" << HS_ACC()
<< "]: Exception: " << e.what();
@@ -1595,7 +1597,7 @@ SetHook::setHook()
<< "HookSet(" << hook::log::WASM_INVALID << ")["
<< HS_ACC()
<< "]: Malformed transaction: SetHook operation "
"would create invalid hook wasm";
"would create invalid hook wasm: " << e.what();
return tecINTERNAL;
}