Compare commits

...

3 Commits

Author SHA1 Message Date
JCW
836c558d02 Address PR comments
Signed-off-by: JCW <a1q123456@users.noreply.github.com>
2025-11-19 14:41:19 +00:00
Bronek Kozicki
bf732c9612 Merge branch 'develop' into a1q123456/retire-CryptoConditionsSuite 2025-11-14 19:29:30 +00:00
JCW
f5a43811e3 Retire CryptoConditionsSuite
Signed-off-by: JCW <a1q123456@users.noreply.github.com>
2025-11-14 10:13:21 +00:00
3 changed files with 18 additions and 8 deletions

View File

@@ -83,7 +83,7 @@ XRPL_FEATURE(Flow, Supported::yes, VoteBehavior::DefaultYe
// //
// If a feature remains obsolete for long enough that no clients are able // If a feature remains obsolete for long enough that no clients are able
// to vote for it, the feature can be removed (entirely?) from the code. // to vote for it, the feature can be removed (entirely?) from the code.
XRPL_FEATURE(CryptoConditionsSuite, Supported::yes, VoteBehavior::Obsolete) XRPL_FEATURE(TestObsolete_DO_NOT_USE, Supported::yes, VoteBehavior::Obsolete)
// The following amendments have been active for at least two years. Their // The following amendments have been active for at least two years. Their
// pre-amendment code has been removed and the identifiers are deprecated. // pre-amendment code has been removed and the identifiers are deprecated.
@@ -119,6 +119,7 @@ XRPL_RETIRE_FIX(TrustLinesToSelf)
XRPL_RETIRE_FEATURE(CheckCashMakesTrustLine) XRPL_RETIRE_FEATURE(CheckCashMakesTrustLine)
XRPL_RETIRE_FEATURE(CryptoConditions) XRPL_RETIRE_FEATURE(CryptoConditions)
XRPL_RETIRE_FEATURE(CryptoConditionsSuite)
XRPL_RETIRE_FEATURE(DepositAuth) XRPL_RETIRE_FEATURE(DepositAuth)
XRPL_RETIRE_FEATURE(DepositPreauth) XRPL_RETIRE_FEATURE(DepositPreauth)
XRPL_RETIRE_FEATURE(Escrow) XRPL_RETIRE_FEATURE(Escrow)

View File

@@ -528,7 +528,22 @@ class Feature_test : public beast::unit_test::suite
using namespace test::jtx; using namespace test::jtx;
Env env{*this}; Env env{*this};
constexpr char const* featureName = "CryptoConditionsSuite";
auto const& supportedAmendments = detail::supportedAmendments();
auto obsoleteFeature = std::find_if(
std::begin(supportedAmendments),
std::end(supportedAmendments),
[](auto const& pair) {
return pair.second == VoteBehavior::Obsolete;
});
if (obsoleteFeature == std::end(supportedAmendments))
{
pass();
return;
}
auto const featureName = obsoleteFeature->first;
auto jrr = env.rpc("feature", featureName)[jss::result]; auto jrr = env.rpc("feature", featureName)[jss::result];
if (!BEAST_EXPECTS(jrr[jss::status] == jss::success, "status")) if (!BEAST_EXPECTS(jrr[jss::status] == jss::success, "status"))

View File

@@ -153,12 +153,6 @@ EscrowCreate::preflight(PreflightContext const& ctx)
<< ec.message(); << ec.message();
return temMALFORMED; return temMALFORMED;
} }
// Conditions other than PrefixSha256 require the
// "CryptoConditionsSuite" amendment:
if (condition->type != Type::preimageSha256 &&
!ctx.rules.enabled(featureCryptoConditionsSuite))
return temDISABLED;
} }
return tesSUCCESS; return tesSUCCESS;