Skip to content

Commit 60fce3c

Browse files
committed
improves feature gating
1 parent f8b555d commit 60fce3c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/test/app/Vault_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5024,7 +5024,7 @@ class Vault_test : public beast::unit_test::suite
50245024
"fixLendingProtocolV1_1 disabled",
50255025
all - fixLendingProtocolV1_1,
50265026
std::string(maxDataPayloadLength, 'A'),
5027-
tesSUCCESS);
5027+
temDISABLED);
50285028
}
50295029

50305030
{

src/xrpld/app/tx/detail/VaultDelete.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ VaultDelete::preflight(PreflightContext const& ctx)
1919
return temMALFORMED;
2020
}
2121

22-
if (ctx.rules.enabled(fixLendingProtocolV1_1))
23-
{
24-
// The sfData field is an optional field used to record the deletion reason.
25-
if (auto const data = ctx.tx[~sfData]; data && !validDataLength(data, maxDataPayloadLength))
26-
return temMALFORMED;
27-
}
22+
if (ctx.tx.isFieldPresent(sfData) && !ctx.rules.enabled(fixLendingProtocolV1_1))
23+
return temDISABLED;
24+
25+
// The sfData field is an optional field used to record the deletion reason.
26+
if (auto const data = ctx.tx[~sfData]; data && !validDataLength(data, maxDataPayloadLength))
27+
return temMALFORMED;
2828

2929
return tesSUCCESS;
3030
}

0 commit comments

Comments
 (0)