Skip to content

Commit

Permalink
Rename fix, correct typo
Browse files Browse the repository at this point in the history
  • Loading branch information
oleks-rip committed Jan 17, 2025
1 parent 6137a6e commit 4444d42
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions include/xrpl/protocol/detail/features.macro
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
// If you add an amendment here, then do not forget to increment `numFeatures`
// in include/xrpl/protocol/Feature.h.

// fix1782: Check flags in Credential transactions
XRPL_FIX (1782, Supported::yes, VoteBehavior::DefaultNo)
// Check flags in Credential transactions
XRPL_FIX (CredentialFlags, Supported::yes, VoteBehavior::DefaultYes)
XRPL_FEATURE(PermissionedDomains, Supported::no, VoteBehavior::DefaultNo)
XRPL_FEATURE(DynamicNFT, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FEATURE(Credentials, Supported::yes, VoteBehavior::DefaultNo)
Expand Down
6 changes: 3 additions & 3 deletions src/test/app/Credentials_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1075,9 +1075,9 @@ struct Credentials_test : public beast::unit_test::suite
env.close();

{
bool const enabled = features[fix1782];
bool const enabled = features[fixCredentialFlags];
testcase(
std::string("Tets flag, fix ") +
std::string("Test flag, fix ") +
(enabled ? "enabled" : "disabled"));

ter const expected(
Expand Down Expand Up @@ -1106,7 +1106,7 @@ struct Credentials_test : public beast::unit_test::suite
testAcceptFailed(all);
testDeleteFailed(all);
testFeatureFailed(all - featureCredentials);
testFlags(all - fix1782);
testFlags(all - fixCredentialFlags);
testFlags(all);
testRPC();
}
Expand Down
9 changes: 6 additions & 3 deletions src/xrpld/app/tx/detail/Credentials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ CredentialCreate::preflight(PreflightContext const& ctx)
auto const& tx = ctx.tx;
auto& j = ctx.j;

if (ctx.rules.enabled(fix1782) && (tx.getFlags() & tfUniversalMask))
if (ctx.rules.enabled(fixCredentialFlags) &&
(tx.getFlags() & tfUniversalMask))
{
JLOG(ctx.j.debug()) << "CredentialCreate: invalid flags.";
return temINVALID_FLAG;
Expand Down Expand Up @@ -215,7 +216,8 @@ CredentialDelete::preflight(PreflightContext const& ctx)
if (auto const ret = preflight1(ctx); !isTesSuccess(ret))
return ret;

if (ctx.rules.enabled(fix1782) && (ctx.tx.getFlags() & tfUniversalMask))
if (ctx.rules.enabled(fixCredentialFlags) &&
(ctx.tx.getFlags() & tfUniversalMask))
{
JLOG(ctx.j.debug()) << "CredentialDelete: invalid flags.";
return temINVALID_FLAG;
Expand Down Expand Up @@ -301,7 +303,8 @@ CredentialAccept::preflight(PreflightContext const& ctx)
if (auto const ret = preflight1(ctx); !isTesSuccess(ret))
return ret;

if (ctx.rules.enabled(fix1782) && (ctx.tx.getFlags() & tfUniversalMask))
if (ctx.rules.enabled(fixCredentialFlags) &&
(ctx.tx.getFlags() & tfUniversalMask))
{
JLOG(ctx.j.debug()) << "CredentialAccept: invalid flags.";
return temINVALID_FLAG;
Expand Down

0 comments on commit 4444d42

Please sign in to comment.