uncomment????

This commit is contained in:
Mayukha Vadari
2025-05-28 14:00:50 -04:00
parent ce31acf030
commit fb1311e013

View File

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