debug comments

This commit is contained in:
Mayukha Vadari
2025-05-28 13:48:38 -04:00
parent 31ad5ac63b
commit ce31acf030

View File

@@ -58,19 +58,19 @@ runEscrowWasm(
std::int64_t const sgas = gasLimit; // vm.getGas();
auto ret = vm.run(wasmCode, funcName, imports, {}, hfs->getJournal());
// std::cout << "runEscrowWasm, mod size: " << wasmCode.size()
// << ", gasLimit: " << gasLimit << ", funcName: " << funcName;
std::cout << "runEscrowWasm, mod size: " << wasmCode.size()
<< ", gasLimit: " << gasLimit << ", funcName: " << funcName;
if (!ret.has_value())
{
// std::cout << ", error: " << ret.error() << std::endl;
std::cout << ", error: " << ret.error() << std::endl;
return Unexpected<TER>(ret.error());
}
std::int64_t const egas = vm.getGas();
std::uint64_t const spent = static_cast<std::uint64_t>(sgas - egas);
// std::cout << ", ret: " << ret.value() << ", gas spent: " << spent
// << std::endl;
std::cout << ", ret: " << ret.value() << ", gas spent: " << spent
<< std::endl;
return EscrowResult{static_cast<bool>(ret.value()), spent};
}