fix: Charge heavy rpc if wasm was executed during simulate call

This commit is contained in:
TimothyBanks
2026-09-25 08:58:05 -04:00
parent f04386dcf7
commit d283421c64

View File

@@ -281,6 +281,13 @@ simulateTxn(rpc::JsonContext& context, std::shared_ptr<Transaction> transaction)
if (result.metadata)
{
if (result.metadata->getVMReturnCode().has_value())
{
// WASM code was executed during this simulation.
// Charge more for that since gas is not charged during simulation.
context.loadType = resource::kFeeHeavyBurdenRpc;
}
if (isBinaryOutput)
{
auto const metaBlob = result.metadata->getAsObject().getSerializer().getData();