refactor: Rename fixLendingProtocolV1_1 to featureLendingProtocolV1_1 (#6527)

Use XRPL_FEATURE macro instead of XRPL_FIX since
LendingProtocolV1_1 is a feature amendment, not a fix.
Update all references in VaultDelete and related tests.
This commit is contained in:
Vito Tumas
2026-03-16 09:26:57 +01:00
committed by Vito
parent 199fdeb09d
commit ec2a5ab620
4 changed files with 13 additions and 14 deletions

View File

@@ -15,7 +15,7 @@
// Add new amendments to the top of this list.
// Keep it sorted in reverse chronological order.
XRPL_FIX (LendingProtocolV1_1, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FEATURE(LendingProtocolV1_1, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FIX (Cleanup3_3_0, Supported::Yes, VoteBehavior::DefaultNo)
XRPL_FIX (Cleanup3_2_0, Supported::Yes, VoteBehavior::DefaultNo)

View File

@@ -28,7 +28,7 @@ VaultDelete::preflight(PreflightContext const& ctx)
return temMALFORMED;
}
if (ctx.tx.isFieldPresent(sfMemoData) && !ctx.rules.enabled(fixLendingProtocolV1_1))
if (ctx.tx.isFieldPresent(sfMemoData) && !ctx.rules.enabled(featureLendingProtocolV1_1))
return temDISABLED;
// The sfMemoData field is an optional field used to record the deletion reason.

View File

@@ -2032,13 +2032,13 @@ class LoanBroker_test : public beast::unit_test::Suite
}
void
testFixAmendmentEnabled()
testFeatureLendingProtocolV1_1enabled()
{
using namespace jtx;
testcase("testFixAmendmentEnabled");
testcase("featureLendingProtocolV1_1 enabled");
Env env{*this};
BEAST_EXPECT(env.enabled(fixLendingProtocolV1_1));
BEAST_EXPECT(env.enabled(featureLendingProtocolV1_1));
}
// Exercises canApplyToBrokerCover (fixCleanup3_2_0): a deposit, withdraw,
@@ -2254,9 +2254,8 @@ public:
void
run() override
{
testFixAmendmentEnabled();
testFeatureLendingProtocolV1_1enabled();
testCoverPrecisionGuard();
testLoanBrokerSetDebtMaximum();
testLoanBrokerCoverDepositNullVault();

View File

@@ -7840,20 +7840,20 @@ class Vault_test : public beast::unit_test::Suite
auto const keylet = keylet::vault(owner.id(), 1);
auto delTx = vault.del({.owner = owner, .id = keylet.key});
// Test VaultDelete with fixLendingProtocolV1_1 disabled
// Test VaultDelete with featureLendingProtocolV1_1 disabled
// Transaction fails if the data field is provided
{
testcase("VaultDelete data fixLendingProtocolV1_1 disabled");
env.disableFeature(fixLendingProtocolV1_1);
testcase("VaultDelete data featureLendingProtocolV1_1 disabled");
env.disableFeature(featureLendingProtocolV1_1);
delTx[sfMemoData] = strHex(std::string(maxDataPayloadLength, 'A'));
env(delTx, ter(temDISABLED), THISLINE);
env.close();
env.enableFeature(fixLendingProtocolV1_1);
env.enableFeature(featureLendingProtocolV1_1);
}
// Transaction fails if the data field is too large
{
testcase("VaultDelete data fixLendingProtocolV1_1 enabled data too large");
testcase("VaultDelete data featureLendingProtocolV1_1 enabled data too large");
delTx[sfMemoData] = strHex(std::string(maxDataPayloadLength + 1, 'A'));
env(delTx, ter(temMALFORMED), THISLINE);
env.close();
@@ -7861,14 +7861,14 @@ class Vault_test : public beast::unit_test::Suite
// Transaction fails if the data field is set, but is empty
{
testcase("VaultDelete data fixLendingProtocolV1_1 enabled data empty");
testcase("VaultDelete data featureLendingProtocolV1_1 enabled data empty");
delTx[sfMemoData] = strHex(std::string(0, 'A'));
env(delTx, ter(temMALFORMED), THISLINE);
env.close();
}
{
testcase("VaultDelete data fixLendingProtocolV1_1 enabled data valid");
testcase("VaultDelete data featureLendingProtocolV1_1 enabled data valid");
PrettyAsset const xrpAsset = xrpIssue();
auto [tx, keylet] = vault.create({.owner = owner, .asset = xrpAsset});
env(tx, ter(tesSUCCESS), THISLINE);