mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Supported::No for featureCredentials
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
XRPL_FEATURE(DeepFreeze, Supported::yes, VoteBehavior::DefaultNo)
|
||||
XRPL_FEATURE(PermissionedDomains, 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(MPTokensV1, Supported::no, VoteBehavior::DefaultNo)
|
||||
// InvariantsV1_1 will be changes to Supported::yes when all the
|
||||
|
||||
@@ -913,7 +913,7 @@ public:
|
||||
}
|
||||
|
||||
void
|
||||
testDestinationDepositAuthCredentials()
|
||||
testDestinationDepositAuthCredentials(FeatureBitset features)
|
||||
{
|
||||
{
|
||||
testcase(
|
||||
@@ -928,7 +928,7 @@ public:
|
||||
|
||||
const char credType[] = "abcd";
|
||||
|
||||
Env env{*this};
|
||||
Env env{*this, features};
|
||||
env.fund(XRP(100000), alice, becky, carol, daria);
|
||||
env.close();
|
||||
|
||||
@@ -1149,7 +1149,7 @@ public:
|
||||
Account const becky{"becky"};
|
||||
Account const carol{"carol"};
|
||||
|
||||
Env env{*this, supported_amendments() - featureCredentials};
|
||||
Env env{*this, features - featureCredentials};
|
||||
env.fund(XRP(100000), alice, becky, carol);
|
||||
env.close();
|
||||
|
||||
@@ -1181,7 +1181,7 @@ public:
|
||||
}
|
||||
|
||||
void
|
||||
testDeleteCredentialsOwner()
|
||||
testDeleteCredentialsOwner(FeatureBitset features)
|
||||
{
|
||||
{
|
||||
testcase("Deleting Issuer deletes issued credentials");
|
||||
@@ -1194,7 +1194,7 @@ public:
|
||||
|
||||
const char credType[] = "abcd";
|
||||
|
||||
Env env{*this};
|
||||
Env env{*this, features};
|
||||
env.fund(XRP(100000), alice, becky, carol);
|
||||
env.close();
|
||||
|
||||
@@ -1238,7 +1238,7 @@ public:
|
||||
|
||||
const char credType[] = "abcd";
|
||||
|
||||
Env env{*this};
|
||||
Env env{*this, features};
|
||||
env.fund(XRP(100000), alice, becky, carol);
|
||||
env.close();
|
||||
|
||||
@@ -1286,12 +1286,12 @@ public:
|
||||
testBalanceTooSmallForFee(features);
|
||||
testWithTickets(features);
|
||||
testDest(features);
|
||||
testDestinationDepositAuthCredentials();
|
||||
testDeleteCredentialsOwner();
|
||||
testDestinationDepositAuthCredentials(features);
|
||||
testDeleteCredentialsOwner(features);
|
||||
};
|
||||
|
||||
using namespace test::jtx;
|
||||
auto const sa = supported_amendments();
|
||||
auto const sa = supported_amendments() | featureCredentials;
|
||||
testWithFeatures(sa);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -967,7 +967,7 @@ struct Credentials_test : public beast::unit_test::suite
|
||||
}
|
||||
|
||||
void
|
||||
testRPC()
|
||||
testRPC(FeatureBitset features)
|
||||
{
|
||||
using namespace test::jtx;
|
||||
|
||||
@@ -977,7 +977,7 @@ struct Credentials_test : public beast::unit_test::suite
|
||||
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env{*this};
|
||||
Env env{*this, features};
|
||||
|
||||
env.fund(XRP(5000), subject, issuer);
|
||||
env.close();
|
||||
@@ -1094,7 +1094,7 @@ struct Credentials_test : public beast::unit_test::suite
|
||||
run() override
|
||||
{
|
||||
using namespace test::jtx;
|
||||
FeatureBitset const all{supported_amendments()};
|
||||
FeatureBitset const all{supported_amendments() | featureCredentials};
|
||||
testSuccessful(all);
|
||||
testCredentialsDelete(all);
|
||||
testCreateFailed(all);
|
||||
@@ -1102,7 +1102,7 @@ struct Credentials_test : public beast::unit_test::suite
|
||||
testDeleteFailed(all);
|
||||
testFeatureFailed(all - featureCredentials);
|
||||
testFlags(all);
|
||||
testRPC();
|
||||
testRPC(all);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ struct DepositAuth_test : public beast::unit_test::suite
|
||||
}
|
||||
{
|
||||
// featureDepositAuth is enabled.
|
||||
Env env(*this);
|
||||
Env env(*this, features);
|
||||
env.fund(XRP(10000), alice);
|
||||
|
||||
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 That entry should cost one reserve.
|
||||
// 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.close();
|
||||
|
||||
@@ -456,7 +456,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
|
||||
{
|
||||
// Verify that an account can be preauthorized and unauthorized
|
||||
// using tickets.
|
||||
Env env(*this);
|
||||
Env env(*this, features);
|
||||
env.fund(XRP(10000), alice, becky);
|
||||
env.close();
|
||||
|
||||
@@ -810,7 +810,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
|
||||
}
|
||||
|
||||
void
|
||||
testCredentialsPayment()
|
||||
testCredentialsPayment(FeatureBitset features)
|
||||
{
|
||||
using namespace jtx;
|
||||
|
||||
@@ -824,7 +824,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
|
||||
{
|
||||
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.close();
|
||||
@@ -856,7 +856,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
|
||||
{
|
||||
testcase("Payment with credentials.");
|
||||
|
||||
Env env(*this);
|
||||
Env env(*this, features);
|
||||
|
||||
env.fund(XRP(5000), issuer, alice, bob, john);
|
||||
env.close();
|
||||
@@ -926,7 +926,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
|
||||
{
|
||||
testcase("Payment failed with invalid credentials.");
|
||||
|
||||
Env env(*this);
|
||||
Env env(*this, features);
|
||||
|
||||
env.fund(XRP(10000), issuer, alice, bob, maria);
|
||||
env.close();
|
||||
@@ -1015,7 +1015,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
|
||||
}
|
||||
|
||||
void
|
||||
testCredentialsCreation()
|
||||
testCredentialsCreation(FeatureBitset features)
|
||||
{
|
||||
using namespace jtx;
|
||||
|
||||
@@ -1028,7 +1028,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
|
||||
{
|
||||
testcase("Creating / deleting with credentials.");
|
||||
|
||||
Env env(*this);
|
||||
Env env(*this, features);
|
||||
|
||||
env.fund(XRP(5000), issuer, alice, bob);
|
||||
env.close();
|
||||
@@ -1186,7 +1186,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
|
||||
}
|
||||
|
||||
void
|
||||
testExpiredCreds()
|
||||
testExpiredCreds(FeatureBitset features)
|
||||
{
|
||||
using namespace jtx;
|
||||
const char credType[] = "abcde";
|
||||
@@ -1201,7 +1201,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
|
||||
{
|
||||
testcase("Payment failed with expired credentials.");
|
||||
|
||||
Env env(*this);
|
||||
Env env(*this, features);
|
||||
|
||||
env.fund(XRP(10000), issuer, alice, bob, gw);
|
||||
env.close();
|
||||
@@ -1348,7 +1348,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
|
||||
|
||||
testcase("Escrow failed with expired credentials.");
|
||||
|
||||
Env env(*this);
|
||||
Env env(*this, features);
|
||||
|
||||
env.fund(XRP(5000), issuer, alice, bob, zelda);
|
||||
env.close();
|
||||
@@ -1422,7 +1422,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
|
||||
}
|
||||
|
||||
void
|
||||
testSortingCredentials()
|
||||
testSortingCredentials(FeatureBitset features)
|
||||
{
|
||||
using namespace jtx;
|
||||
|
||||
@@ -1430,7 +1430,7 @@ struct DepositPreauth_test : public beast::unit_test::suite
|
||||
Account const alice{"alice"};
|
||||
Account const bob{"bob"};
|
||||
|
||||
Env env(*this);
|
||||
Env env(*this, features);
|
||||
|
||||
testcase("Sorting credentials.");
|
||||
|
||||
@@ -1553,17 +1553,19 @@ struct DepositPreauth_test : public beast::unit_test::suite
|
||||
void
|
||||
run() override
|
||||
{
|
||||
auto const all{jtx::supported_amendments() - featureXahauGenesis};
|
||||
auto const all{
|
||||
(jtx::supported_amendments() | featureCredentials) -
|
||||
featureXahauGenesis};
|
||||
testEnable(all);
|
||||
testInvalid(all);
|
||||
testPayment(all - featureDepositPreauth - featureCredentials);
|
||||
testPayment(all - featureDepositPreauth);
|
||||
testPayment(all - featureCredentials);
|
||||
testPayment(all);
|
||||
testCredentialsPayment();
|
||||
testCredentialsCreation();
|
||||
testExpiredCreds();
|
||||
testSortingCredentials();
|
||||
testCredentialsPayment(all);
|
||||
testCredentialsCreation(all);
|
||||
testExpiredCreds(all);
|
||||
testSortingCredentials(all);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -4419,7 +4419,7 @@ struct Escrow_test : public beast::unit_test::suite
|
||||
}
|
||||
|
||||
void
|
||||
testCredentials()
|
||||
testCredentials(FeatureBitset features)
|
||||
{
|
||||
testcase("Test with credentials");
|
||||
|
||||
@@ -4435,7 +4435,7 @@ struct Escrow_test : public beast::unit_test::suite
|
||||
|
||||
{
|
||||
// Credentials amendment not enabled
|
||||
Env env(*this, supported_amendments() - featureCredentials);
|
||||
Env env(*this, features - featureCredentials);
|
||||
env.fund(XRP(5000), alice, bob);
|
||||
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.close();
|
||||
@@ -4505,7 +4505,7 @@ struct Escrow_test : public beast::unit_test::suite
|
||||
testcase("Escrow with credentials without depositPreauth");
|
||||
using namespace std::chrono;
|
||||
|
||||
Env env(*this);
|
||||
Env env(*this, features);
|
||||
|
||||
env.fund(XRP(5000), alice, bob, carol, dillon, zelda);
|
||||
env.close();
|
||||
@@ -4606,12 +4606,12 @@ public:
|
||||
run() override
|
||||
{
|
||||
using namespace test::jtx;
|
||||
FeatureBitset const all{supported_amendments()};
|
||||
FeatureBitset const all{supported_amendments() | featureCredentials};
|
||||
testWithFeats(all - featurePaychanAndEscrowForTokens);
|
||||
testWithFeats(all);
|
||||
testIOUWithFeats(all);
|
||||
testEscrowID(all);
|
||||
testCredentials();
|
||||
testCredentials(all);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -2308,7 +2308,8 @@ public:
|
||||
run() override
|
||||
{
|
||||
using namespace test::jtx;
|
||||
FeatureBitset const all{supported_amendments() | featureMPTokensV1};
|
||||
FeatureBitset const all{
|
||||
supported_amendments() | featureMPTokensV1 | featureCredentials};
|
||||
|
||||
// MPTokenIssuanceCreate
|
||||
testCreateValidation(all);
|
||||
|
||||
@@ -913,7 +913,7 @@ struct PayChan_test : public beast::unit_test::suite
|
||||
}
|
||||
|
||||
void
|
||||
testDepositAuthCreds()
|
||||
testDepositAuthCreds(FeatureBitset features)
|
||||
{
|
||||
testcase("Deposit Authorization with Credentials");
|
||||
using namespace jtx;
|
||||
@@ -928,7 +928,7 @@ struct PayChan_test : public beast::unit_test::suite
|
||||
Account const zelda("zelda");
|
||||
|
||||
{
|
||||
Env env{*this};
|
||||
Env env{*this, features};
|
||||
env.fund(XRP(10000), alice, bob, carol, dillon, zelda);
|
||||
|
||||
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);
|
||||
|
||||
auto const pk = alice.pk();
|
||||
@@ -1068,7 +1068,7 @@ struct PayChan_test : public beast::unit_test::suite
|
||||
|
||||
{
|
||||
// Credentials amendment not enabled
|
||||
Env env(*this, supported_amendments() - featureCredentials);
|
||||
Env env(*this, features - featureCredentials);
|
||||
env.fund(XRP(5000), "alice", "bob");
|
||||
env.close();
|
||||
|
||||
@@ -5798,14 +5798,14 @@ public:
|
||||
run() override
|
||||
{
|
||||
using namespace test::jtx;
|
||||
FeatureBitset const all{supported_amendments()};
|
||||
FeatureBitset const all{supported_amendments() | featureCredentials};
|
||||
testWithFeats(all - disallowIncoming);
|
||||
testWithFeats(
|
||||
all - disallowIncoming - featurePaychanAndEscrowForTokens);
|
||||
testWithFeats(all);
|
||||
testIOUWithFeats(all - disallowIncoming);
|
||||
testIOUWithFeats(all);
|
||||
testDepositAuthCreds();
|
||||
testDepositAuthCreds(all);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ class PermissionedDomains_test : public beast::unit_test::suite
|
||||
void
|
||||
testCredentialsDisabled()
|
||||
{
|
||||
auto amendments = supported_amendments();
|
||||
auto amendments = supported_amendments() | featureCredentials;
|
||||
amendments.set(featurePermissionedDomains);
|
||||
amendments.reset(featureCredentials);
|
||||
testcase("Credentials disabled");
|
||||
|
||||
@@ -577,7 +577,7 @@ public:
|
||||
|
||||
Env env(
|
||||
*this,
|
||||
features | featureXChainBridge | featureDID |
|
||||
features | featureXChainBridge | featureDID | featureCredentials |
|
||||
featurePermissionedDomains);
|
||||
|
||||
// Make a lambda we can use to get "account_objects" easily.
|
||||
|
||||
@@ -341,7 +341,7 @@ public:
|
||||
Account const diana{"diana"};
|
||||
Account const carol{"carol"};
|
||||
|
||||
Env env(*this);
|
||||
Env env(*this, supported_amendments() | featureCredentials);
|
||||
env.fund(XRP(1000), alice, becky, carol, diana);
|
||||
env.close();
|
||||
|
||||
|
||||
@@ -751,7 +751,7 @@ public:
|
||||
|
||||
using namespace test::jtx;
|
||||
|
||||
Env env(*this);
|
||||
Env env(*this, supported_amendments() | featureCredentials);
|
||||
Account const issuer{"issuer"};
|
||||
Account const alice{"alice"};
|
||||
Account const bob{"bob"};
|
||||
@@ -1080,7 +1080,7 @@ public:
|
||||
|
||||
using namespace test::jtx;
|
||||
|
||||
Env env(*this);
|
||||
Env env(*this, supported_amendments() | featureCredentials);
|
||||
Account const issuer{"issuer"};
|
||||
Account const alice{"alice"};
|
||||
Account const bob{"bob"};
|
||||
@@ -3744,7 +3744,10 @@ public:
|
||||
|
||||
using namespace test::jtx;
|
||||
|
||||
Env env(*this, supported_amendments() | featurePermissionedDomains);
|
||||
Env env(
|
||||
*this,
|
||||
supported_amendments() | featureCredentials |
|
||||
featurePermissionedDomains);
|
||||
Account const issuer{"issuer"};
|
||||
Account const alice{"alice"};
|
||||
Account const bob{"bob"};
|
||||
|
||||
@@ -890,7 +890,7 @@ class Simulate_test : public beast::unit_test::suite
|
||||
// scenario setup
|
||||
|
||||
using namespace jtx;
|
||||
Env env(*this);
|
||||
Env env(*this, supported_amendments() | featureCredentials);
|
||||
|
||||
Account const subject{"subject"};
|
||||
Account const issuer{"issuer"};
|
||||
|
||||
Reference in New Issue
Block a user