Supported::No for featureCredentials

This commit is contained in:
tequ
2025-07-01 15:54:07 +09:00
parent 85a1eb5dba
commit 7080d292e6
12 changed files with 59 additions and 53 deletions

View File

@@ -32,7 +32,7 @@
XRPL_FEATURE(DeepFreeze, Supported::yes, VoteBehavior::DefaultNo) XRPL_FEATURE(DeepFreeze, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FEATURE(PermissionedDomains, Supported::yes, VoteBehavior::DefaultNo) XRPL_FEATURE(PermissionedDomains, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FEATURE(DynamicNFT, Supported::yes, VoteBehavior::DefaultNo) XRPL_FEATURE(DynamicNFT, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FEATURE(Credentials, Supported::yes, VoteBehavior::DefaultNo) XRPL_FEATURE(Credentials, Supported::no, VoteBehavior::DefaultNo)
XRPL_FEATURE(AMMClawback, Supported::yes, VoteBehavior::DefaultNo) XRPL_FEATURE(AMMClawback, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FEATURE(MPTokensV1, Supported::no, VoteBehavior::DefaultNo) XRPL_FEATURE(MPTokensV1, Supported::no, VoteBehavior::DefaultNo)
// InvariantsV1_1 will be changes to Supported::yes when all the // InvariantsV1_1 will be changes to Supported::yes when all the

View File

@@ -913,7 +913,7 @@ public:
} }
void void
testDestinationDepositAuthCredentials() testDestinationDepositAuthCredentials(FeatureBitset features)
{ {
{ {
testcase( testcase(
@@ -928,7 +928,7 @@ public:
const char credType[] = "abcd"; const char credType[] = "abcd";
Env env{*this}; Env env{*this, features};
env.fund(XRP(100000), alice, becky, carol, daria); env.fund(XRP(100000), alice, becky, carol, daria);
env.close(); env.close();
@@ -1149,7 +1149,7 @@ public:
Account const becky{"becky"}; Account const becky{"becky"};
Account const carol{"carol"}; Account const carol{"carol"};
Env env{*this, supported_amendments() - featureCredentials}; Env env{*this, features - featureCredentials};
env.fund(XRP(100000), alice, becky, carol); env.fund(XRP(100000), alice, becky, carol);
env.close(); env.close();
@@ -1181,7 +1181,7 @@ public:
} }
void void
testDeleteCredentialsOwner() testDeleteCredentialsOwner(FeatureBitset features)
{ {
{ {
testcase("Deleting Issuer deletes issued credentials"); testcase("Deleting Issuer deletes issued credentials");
@@ -1194,7 +1194,7 @@ public:
const char credType[] = "abcd"; const char credType[] = "abcd";
Env env{*this}; Env env{*this, features};
env.fund(XRP(100000), alice, becky, carol); env.fund(XRP(100000), alice, becky, carol);
env.close(); env.close();
@@ -1238,7 +1238,7 @@ public:
const char credType[] = "abcd"; const char credType[] = "abcd";
Env env{*this}; Env env{*this, features};
env.fund(XRP(100000), alice, becky, carol); env.fund(XRP(100000), alice, becky, carol);
env.close(); env.close();
@@ -1286,12 +1286,12 @@ public:
testBalanceTooSmallForFee(features); testBalanceTooSmallForFee(features);
testWithTickets(features); testWithTickets(features);
testDest(features); testDest(features);
testDestinationDepositAuthCredentials(); testDestinationDepositAuthCredentials(features);
testDeleteCredentialsOwner(); testDeleteCredentialsOwner(features);
}; };
using namespace test::jtx; using namespace test::jtx;
auto const sa = supported_amendments(); auto const sa = supported_amendments() | featureCredentials;
testWithFeatures(sa); testWithFeatures(sa);
} }
}; };

View File

@@ -967,7 +967,7 @@ struct Credentials_test : public beast::unit_test::suite
} }
void void
testRPC() testRPC(FeatureBitset features)
{ {
using namespace test::jtx; using namespace test::jtx;
@@ -977,7 +977,7 @@ struct Credentials_test : public beast::unit_test::suite
{ {
using namespace jtx; using namespace jtx;
Env env{*this}; Env env{*this, features};
env.fund(XRP(5000), subject, issuer); env.fund(XRP(5000), subject, issuer);
env.close(); env.close();
@@ -1094,7 +1094,7 @@ struct Credentials_test : public beast::unit_test::suite
run() override run() override
{ {
using namespace test::jtx; using namespace test::jtx;
FeatureBitset const all{supported_amendments()}; FeatureBitset const all{supported_amendments() | featureCredentials};
testSuccessful(all); testSuccessful(all);
testCredentialsDelete(all); testCredentialsDelete(all);
testCreateFailed(all); testCreateFailed(all);
@@ -1102,7 +1102,7 @@ struct Credentials_test : public beast::unit_test::suite
testDeleteFailed(all); testDeleteFailed(all);
testFeatureFailed(all - featureCredentials); testFeatureFailed(all - featureCredentials);
testFlags(all); testFlags(all);
testRPC(); testRPC(all);
} }
}; };

View File

@@ -66,7 +66,7 @@ struct DepositAuth_test : public beast::unit_test::suite
} }
{ {
// featureDepositAuth is enabled. // featureDepositAuth is enabled.
Env env(*this); Env env(*this, features);
env.fund(XRP(10000), alice); env.fund(XRP(10000), alice);
env(fset(alice, asfDepositAuth)); env(fset(alice, asfDepositAuth));
@@ -437,7 +437,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
// o We should be able to add and remove an entry, and // o We should be able to add and remove an entry, and
// o That entry should cost one reserve. // o That entry should cost one reserve.
// o The reserve should be returned when the entry is removed. // o The reserve should be returned when the entry is removed.
Env env(*this); Env env(*this, features);
env.fund(XRP(10000), alice, becky); env.fund(XRP(10000), alice, becky);
env.close(); env.close();
@@ -456,7 +456,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
{ {
// Verify that an account can be preauthorized and unauthorized // Verify that an account can be preauthorized and unauthorized
// using tickets. // using tickets.
Env env(*this); Env env(*this, features);
env.fund(XRP(10000), alice, becky); env.fund(XRP(10000), alice, becky);
env.close(); env.close();
@@ -810,7 +810,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
} }
void void
testCredentialsPayment() testCredentialsPayment(FeatureBitset features)
{ {
using namespace jtx; using namespace jtx;
@@ -824,7 +824,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
{ {
testcase("Payment failed with disabled credentials rule."); testcase("Payment failed with disabled credentials rule.");
Env env(*this, supported_amendments() - featureCredentials); Env env(*this, features - featureCredentials);
env.fund(XRP(5000), issuer, bob, alice); env.fund(XRP(5000), issuer, bob, alice);
env.close(); env.close();
@@ -856,7 +856,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
{ {
testcase("Payment with credentials."); testcase("Payment with credentials.");
Env env(*this); Env env(*this, features);
env.fund(XRP(5000), issuer, alice, bob, john); env.fund(XRP(5000), issuer, alice, bob, john);
env.close(); env.close();
@@ -926,7 +926,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
{ {
testcase("Payment failed with invalid credentials."); testcase("Payment failed with invalid credentials.");
Env env(*this); Env env(*this, features);
env.fund(XRP(10000), issuer, alice, bob, maria); env.fund(XRP(10000), issuer, alice, bob, maria);
env.close(); env.close();
@@ -1015,7 +1015,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
} }
void void
testCredentialsCreation() testCredentialsCreation(FeatureBitset features)
{ {
using namespace jtx; using namespace jtx;
@@ -1028,7 +1028,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
{ {
testcase("Creating / deleting with credentials."); testcase("Creating / deleting with credentials.");
Env env(*this); Env env(*this, features);
env.fund(XRP(5000), issuer, alice, bob); env.fund(XRP(5000), issuer, alice, bob);
env.close(); env.close();
@@ -1186,7 +1186,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
} }
void void
testExpiredCreds() testExpiredCreds(FeatureBitset features)
{ {
using namespace jtx; using namespace jtx;
const char credType[] = "abcde"; const char credType[] = "abcde";
@@ -1201,7 +1201,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
{ {
testcase("Payment failed with expired credentials."); testcase("Payment failed with expired credentials.");
Env env(*this); Env env(*this, features);
env.fund(XRP(10000), issuer, alice, bob, gw); env.fund(XRP(10000), issuer, alice, bob, gw);
env.close(); env.close();
@@ -1348,7 +1348,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
testcase("Escrow failed with expired credentials."); testcase("Escrow failed with expired credentials.");
Env env(*this); Env env(*this, features);
env.fund(XRP(5000), issuer, alice, bob, zelda); env.fund(XRP(5000), issuer, alice, bob, zelda);
env.close(); env.close();
@@ -1422,7 +1422,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
} }
void void
testSortingCredentials() testSortingCredentials(FeatureBitset features)
{ {
using namespace jtx; using namespace jtx;
@@ -1430,7 +1430,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
Account const alice{"alice"}; Account const alice{"alice"};
Account const bob{"bob"}; Account const bob{"bob"};
Env env(*this); Env env(*this, features);
testcase("Sorting credentials."); testcase("Sorting credentials.");
@@ -1553,17 +1553,19 @@ struct DepositPreauth_test : public beast::unit_test::suite
void void
run() override run() override
{ {
auto const all{jtx::supported_amendments() - featureXahauGenesis}; auto const all{
(jtx::supported_amendments() | featureCredentials) -
featureXahauGenesis};
testEnable(all); testEnable(all);
testInvalid(all); testInvalid(all);
testPayment(all - featureDepositPreauth - featureCredentials); testPayment(all - featureDepositPreauth - featureCredentials);
testPayment(all - featureDepositPreauth); testPayment(all - featureDepositPreauth);
testPayment(all - featureCredentials); testPayment(all - featureCredentials);
testPayment(all); testPayment(all);
testCredentialsPayment(); testCredentialsPayment(all);
testCredentialsCreation(); testCredentialsCreation(all);
testExpiredCreds(); testExpiredCreds(all);
testSortingCredentials(); testSortingCredentials(all);
} }
}; };

View File

@@ -4419,7 +4419,7 @@ struct Escrow_test : public beast::unit_test::suite
} }
void void
testCredentials() testCredentials(FeatureBitset features)
{ {
testcase("Test with credentials"); testcase("Test with credentials");
@@ -4435,7 +4435,7 @@ struct Escrow_test : public beast::unit_test::suite
{ {
// Credentials amendment not enabled // Credentials amendment not enabled
Env env(*this, supported_amendments() - featureCredentials); Env env(*this, features - featureCredentials);
env.fund(XRP(5000), alice, bob); env.fund(XRP(5000), alice, bob);
env.close(); env.close();
@@ -4453,7 +4453,7 @@ struct Escrow_test : public beast::unit_test::suite
} }
{ {
Env env(*this); Env env(*this, features);
env.fund(XRP(5000), alice, bob, carol, dillon, zelda); env.fund(XRP(5000), alice, bob, carol, dillon, zelda);
env.close(); env.close();
@@ -4505,7 +4505,7 @@ struct Escrow_test : public beast::unit_test::suite
testcase("Escrow with credentials without depositPreauth"); testcase("Escrow with credentials without depositPreauth");
using namespace std::chrono; using namespace std::chrono;
Env env(*this); Env env(*this, features);
env.fund(XRP(5000), alice, bob, carol, dillon, zelda); env.fund(XRP(5000), alice, bob, carol, dillon, zelda);
env.close(); env.close();
@@ -4606,12 +4606,12 @@ public:
run() override run() override
{ {
using namespace test::jtx; using namespace test::jtx;
FeatureBitset const all{supported_amendments()}; FeatureBitset const all{supported_amendments() | featureCredentials};
testWithFeats(all - featurePaychanAndEscrowForTokens); testWithFeats(all - featurePaychanAndEscrowForTokens);
testWithFeats(all); testWithFeats(all);
testIOUWithFeats(all); testIOUWithFeats(all);
testEscrowID(all); testEscrowID(all);
testCredentials(); testCredentials(all);
} }
}; };

View File

@@ -2308,7 +2308,8 @@ public:
run() override run() override
{ {
using namespace test::jtx; using namespace test::jtx;
FeatureBitset const all{supported_amendments() | featureMPTokensV1}; FeatureBitset const all{
supported_amendments() | featureMPTokensV1 | featureCredentials};
// MPTokenIssuanceCreate // MPTokenIssuanceCreate
testCreateValidation(all); testCreateValidation(all);

View File

@@ -913,7 +913,7 @@ struct PayChan_test : public beast::unit_test::suite
} }
void void
testDepositAuthCreds() testDepositAuthCreds(FeatureBitset features)
{ {
testcase("Deposit Authorization with Credentials"); testcase("Deposit Authorization with Credentials");
using namespace jtx; using namespace jtx;
@@ -928,7 +928,7 @@ struct PayChan_test : public beast::unit_test::suite
Account const zelda("zelda"); Account const zelda("zelda");
{ {
Env env{*this}; Env env{*this, features};
env.fund(XRP(10000), alice, bob, carol, dillon, zelda); env.fund(XRP(10000), alice, bob, carol, dillon, zelda);
auto const pk = alice.pk(); auto const pk = alice.pk();
@@ -1035,7 +1035,7 @@ struct PayChan_test : public beast::unit_test::suite
} }
{ {
Env env{*this}; Env env{*this, features};
env.fund(XRP(10000), alice, bob, carol, dillon, zelda); env.fund(XRP(10000), alice, bob, carol, dillon, zelda);
auto const pk = alice.pk(); auto const pk = alice.pk();
@@ -1068,7 +1068,7 @@ struct PayChan_test : public beast::unit_test::suite
{ {
// Credentials amendment not enabled // Credentials amendment not enabled
Env env(*this, supported_amendments() - featureCredentials); Env env(*this, features - featureCredentials);
env.fund(XRP(5000), "alice", "bob"); env.fund(XRP(5000), "alice", "bob");
env.close(); env.close();
@@ -5798,14 +5798,14 @@ public:
run() override run() override
{ {
using namespace test::jtx; using namespace test::jtx;
FeatureBitset const all{supported_amendments()}; FeatureBitset const all{supported_amendments() | featureCredentials};
testWithFeats(all - disallowIncoming); testWithFeats(all - disallowIncoming);
testWithFeats( testWithFeats(
all - disallowIncoming - featurePaychanAndEscrowForTokens); all - disallowIncoming - featurePaychanAndEscrowForTokens);
testWithFeats(all); testWithFeats(all);
testIOUWithFeats(all - disallowIncoming); testIOUWithFeats(all - disallowIncoming);
testIOUWithFeats(all); testIOUWithFeats(all);
testDepositAuthCreds(); testDepositAuthCreds(all);
} }
}; };

View File

@@ -83,7 +83,7 @@ class PermissionedDomains_test : public beast::unit_test::suite
void void
testCredentialsDisabled() testCredentialsDisabled()
{ {
auto amendments = supported_amendments(); auto amendments = supported_amendments() | featureCredentials;
amendments.set(featurePermissionedDomains); amendments.set(featurePermissionedDomains);
amendments.reset(featureCredentials); amendments.reset(featureCredentials);
testcase("Credentials disabled"); testcase("Credentials disabled");

View File

@@ -577,7 +577,7 @@ public:
Env env( Env env(
*this, *this,
features | featureXChainBridge | featureDID | features | featureXChainBridge | featureDID | featureCredentials |
featurePermissionedDomains); featurePermissionedDomains);
// Make a lambda we can use to get "account_objects" easily. // Make a lambda we can use to get "account_objects" easily.

View File

@@ -341,7 +341,7 @@ public:
Account const diana{"diana"}; Account const diana{"diana"};
Account const carol{"carol"}; Account const carol{"carol"};
Env env(*this); Env env(*this, supported_amendments() | featureCredentials);
env.fund(XRP(1000), alice, becky, carol, diana); env.fund(XRP(1000), alice, becky, carol, diana);
env.close(); env.close();

View File

@@ -751,7 +751,7 @@ public:
using namespace test::jtx; using namespace test::jtx;
Env env(*this); Env env(*this, supported_amendments() | featureCredentials);
Account const issuer{"issuer"}; Account const issuer{"issuer"};
Account const alice{"alice"}; Account const alice{"alice"};
Account const bob{"bob"}; Account const bob{"bob"};
@@ -1080,7 +1080,7 @@ public:
using namespace test::jtx; using namespace test::jtx;
Env env(*this); Env env(*this, supported_amendments() | featureCredentials);
Account const issuer{"issuer"}; Account const issuer{"issuer"};
Account const alice{"alice"}; Account const alice{"alice"};
Account const bob{"bob"}; Account const bob{"bob"};
@@ -3744,7 +3744,10 @@ public:
using namespace test::jtx; using namespace test::jtx;
Env env(*this, supported_amendments() | featurePermissionedDomains); Env env(
*this,
supported_amendments() | featureCredentials |
featurePermissionedDomains);
Account const issuer{"issuer"}; Account const issuer{"issuer"};
Account const alice{"alice"}; Account const alice{"alice"};
Account const bob{"bob"}; Account const bob{"bob"};

View File

@@ -890,7 +890,7 @@ class Simulate_test : public beast::unit_test::suite
// scenario setup // scenario setup
using namespace jtx; using namespace jtx;
Env env(*this); Env env(*this, supported_amendments() | featureCredentials);
Account const subject{"subject"}; Account const subject{"subject"};
Account const issuer{"issuer"}; Account const issuer{"issuer"};