This commit is contained in:
Valentin Balaschenko
2026-05-29 13:58:08 +01:00
parent 532cac0446
commit 20766dc505

View File

@@ -278,6 +278,17 @@ class PermissionedDEX_test : public beast::unit_test::Suite
env.close();
}
// preflight - a present but zero DomainID is malformed.
// Regression test for "Ledger::read : zero key" assertion.
{
Env env(*this, features);
auto const& [gw_, domainOwner, alice_, bob_, carol_, USD, domainID, credType] =
PermissionedDEX(env);
env(offer(bob_, XRP(10), USD(10)), Domain(uint256{}), Ter(temMALFORMED));
env.close();
}
// apply - offer can be created even if takergets issuer is not in
// domain
{
@@ -413,6 +424,21 @@ class PermissionedDEX_test : public beast::unit_test::Suite
env.close();
}
// preflight - a present but zero DomainID is malformed.
// Regression test for "Ledger::read : zero key" assertion.
{
Env env(*this, features);
auto const& [gw_, domainOwner, alice_, bob_, carol_, USD, domainID, credType] =
PermissionedDEX(env);
env(pay(bob_, alice_, USD(10)),
Path(~USD),
Sendmax(XRP(10)),
Domain(uint256{}),
Ter(temMALFORMED));
env.close();
}
// preclaim - payment with non-domain destination fails
{
Env env(*this, features);