mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-02 08:17:13 +00:00
fix: Amendment to add transaction flag checking functionality for Credentials (#5250)
CredentialCreate / CredentialAccept / CredentialDelete transactions will check sfFlags field in preflight() when the amendment is enabled.
This commit is contained in:
@@ -1672,6 +1672,29 @@ public:
|
||||
BEAST_EXPECT(env.seq(alice) == aliceSeq + 1);
|
||||
}
|
||||
|
||||
void
|
||||
test_signerListSetFlags(FeatureBitset features)
|
||||
{
|
||||
using namespace test::jtx;
|
||||
|
||||
Env env{*this, features};
|
||||
Account const alice{"alice"};
|
||||
|
||||
env.fund(XRP(1000), alice);
|
||||
env.close();
|
||||
|
||||
bool const enabled = features[fixInvalidTxFlags];
|
||||
testcase(
|
||||
std::string("SignerListSet flag, fix ") +
|
||||
(enabled ? "enabled" : "disabled"));
|
||||
|
||||
ter const expected(enabled ? TER(temINVALID_FLAG) : TER(tesSUCCESS));
|
||||
env(signers(alice, 2, {{bogie, 1}, {ghost, 1}}),
|
||||
expected,
|
||||
txflags(tfPassive));
|
||||
env.close();
|
||||
}
|
||||
|
||||
void
|
||||
testAll(FeatureBitset features)
|
||||
{
|
||||
@@ -1708,6 +1731,10 @@ public:
|
||||
testAll(all - featureMultiSignReserve - featureExpandedSignerList);
|
||||
testAll(all - featureExpandedSignerList);
|
||||
testAll(all);
|
||||
|
||||
test_signerListSetFlags(all - fixInvalidTxFlags);
|
||||
test_signerListSetFlags(all);
|
||||
|
||||
test_amendmentTransition();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user