diff --git a/src/test/app/Escrow_test.cpp b/src/test/app/Escrow_test.cpp index 23b2c29c78..00a5302913 100644 --- a/src/test/app/Escrow_test.cpp +++ b/src/test/app/Escrow_test.cpp @@ -1970,6 +1970,13 @@ struct Escrow_test : public beast::unit_test::suite ter(tefWASM_FIELD_NOT_INCLUDED)); } + { + // ComputationAllowance value of 0 + env(escrow::finish(carol, alice, seq), + escrow::comp_allowance(0), + ter(temBAD_LIMIT)); + } + { // not enough fees // This function takes 4 gas diff --git a/src/xrpld/app/tx/detail/Escrow.cpp b/src/xrpld/app/tx/detail/Escrow.cpp index 7639b4efa0..e9a7c78c7f 100644 --- a/src/xrpld/app/tx/detail/Escrow.cpp +++ b/src/xrpld/app/tx/detail/Escrow.cpp @@ -743,6 +743,10 @@ EscrowFinish::preflight(PreflightContext const& ctx) if (auto const allowance = ctx.tx[~sfComputationAllowance]; allowance) { + if (*allowance == 0) + { + return temBAD_LIMIT; + } if (*allowance > ctx.app.config().FEES.extension_compute_limit) { JLOG(ctx.j.debug())