This commit is contained in:
tequ
2026-02-18 14:19:40 +09:00
parent 392a913631
commit d1d613da27
2 changed files with 12 additions and 1 deletions

View File

@@ -157,7 +157,13 @@ Transactor::preflight1(PreflightContext const& ctx, std::uint32_t flagMask)
return temINVALID_FLAG;
}
if (hasSponsorSig && !hasSponsor)
if (!hasSponsor && hasSponsorFlags)
{
JLOG(ctx.j.debug()) << "preflight1: sponsor flags without sponsor definition";
return temINVALID_FLAG;
}
if (!hasSponsor && hasSponsorSig)
{
JLOG(ctx.j.debug()) << "preflight1: sponsor signature without sponsor definition";
return temMALFORMED;

View File

@@ -315,6 +315,11 @@ public:
// Invalid Flags
env(noop(alice), sponsor::as(sponsor, (tfSponsorFee | tfSponsorReserve) + 1), ter(temINVALID_FLAG));
// Invalid Flags without sponsor
auto tx = noop(alice);
tx[sfSponsorFlags.jsonName] = tfSponsorFee | tfSponsorReserve;
env(tx, ter(temINVALID_FLAG));
}
void