Skip to content

Commit

Permalink
Review fixes 4
Browse files Browse the repository at this point in the history
  • Loading branch information
oleks-rip committed Feb 10, 2025
1 parent 6a40ef4 commit 80e9e62
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion include/xrpl/protocol/detail/features.macro
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// in include/xrpl/protocol/Feature.h.

// Check flags in Credential transactions
XRPL_FIX (TransactionFlags, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FIX (InvalidTxFlags, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FIX (FrozenLPTokenTransfer, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FEATURE(DeepFreeze, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FEATURE(PermissionedDomains, Supported::no, VoteBehavior::DefaultNo)
Expand Down
4 changes: 2 additions & 2 deletions src/test/app/Credentials_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ struct Credentials_test : public beast::unit_test::suite
{
using namespace test::jtx;

bool const enabled = features[fixTransactionFlags];
bool const enabled = features[fixInvalidTxFlags];
testcase(
std::string("Test flag, fix ") +
(enabled ? "enabled" : "disabled"));
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 - fixTransactionFlags);
testFlags(all - fixInvalidTxFlags);
testFlags(all);
testRPC();
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/app/MultiSign_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1683,7 +1683,7 @@ class MultiSign_test : public beast::unit_test::suite
env.fund(XRP(1000), alice);
env.close();

bool const enabled = features[fixTransactionFlags];
bool const enabled = features[fixInvalidTxFlags];
testcase(
std::string("SignerListSet flag, fix ") +
(enabled ? "enabled" : "disabled"));
Expand Down Expand Up @@ -1732,7 +1732,7 @@ class MultiSign_test : public beast::unit_test::suite
testAll(all - featureExpandedSignerList);
testAll(all);

test_signerListSetFlags(all - fixTransactionFlags);
test_signerListSetFlags(all - fixInvalidTxFlags);
test_signerListSetFlags(all);

test_amendmentTransition();
Expand Down
6 changes: 3 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,7 @@ CredentialCreate::preflight(PreflightContext const& ctx)
auto const& tx = ctx.tx;
auto& j = ctx.j;

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

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

if (ctx.rules.enabled(fixTransactionFlags) &&
if (ctx.rules.enabled(fixInvalidTxFlags) &&
(ctx.tx.getFlags() & tfUniversalMask))
{
JLOG(ctx.j.debug()) << "CredentialAccept: invalid flags.";
Expand Down
2 changes: 1 addition & 1 deletion src/xrpld/app/tx/detail/SetSignerList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ SetSignerList::preflight(PreflightContext const& ctx)
if (auto const ret = preflight1(ctx); !isTesSuccess(ret))
return ret;

if (ctx.rules.enabled(fixTransactionFlags) &&
if (ctx.rules.enabled(fixInvalidTxFlags) &&
(ctx.tx.getFlags() & tfUniversalMask))
{
JLOG(ctx.j.debug()) << "SetSignerList: invalid flags.";
Expand Down

0 comments on commit 80e9e62

Please sign in to comment.