diff --git a/src/ripple/app/tx/impl/Escrow.cpp b/src/ripple/app/tx/impl/Escrow.cpp index 07d72f7875..30a74c138c 100644 --- a/src/ripple/app/tx/impl/Escrow.cpp +++ b/src/ripple/app/tx/impl/Escrow.cpp @@ -147,7 +147,10 @@ EscrowCreate::preflight(PreflightContext const& ctx) return temMALFORMED; } - if (condition->type != Type::preimageSha256) + // Conditions other than PrefixSha256 require the + // "CryptoConditionsSuite" amendment: + if (condition->type != Type::preimageSha256 && + !ctx.rules.enabled(featureCryptoConditionsSuite)) return temDISABLED; } diff --git a/src/ripple/protocol/Feature.h b/src/ripple/protocol/Feature.h index bec4ad9bdd..0eb79df5b6 100644 --- a/src/ripple/protocol/Feature.h +++ b/src/ripple/protocol/Feature.h @@ -83,7 +83,7 @@ class FeatureCollections "TickSize", "fix1368", "Escrow", - // "CryptoConditionsSuite", + "CryptoConditionsSuite", "fix1373", "EnforceInvariants", "SortedDirectories", @@ -348,6 +348,7 @@ extern uint256 const featureOwnerPaysFee; extern uint256 const featureFlow; extern uint256 const featureCompareTakerFlowCross; extern uint256 const featureFlowCross; +extern uint256 const featureCryptoConditionsSuite; extern uint256 const fix1513; extern uint256 const featureDepositAuth; extern uint256 const featureChecks; diff --git a/src/ripple/protocol/impl/Feature.cpp b/src/ripple/protocol/impl/Feature.cpp index 6a0c34c6ce..e18e1260d6 100644 --- a/src/ripple/protocol/impl/Feature.cpp +++ b/src/ripple/protocol/impl/Feature.cpp @@ -102,7 +102,7 @@ detail::supportedAmendments() "TickSize", "fix1368", "Escrow", - // "CryptoConditionsSuite", DO NOT REUSE + "CryptoConditionsSuite", "fix1373", "EnforceInvariants", "FlowCross", @@ -165,6 +165,7 @@ uint256 const featureFlow = *getRegisteredFeature("Flow"), featureCompareTakerFlowCross = *getRegisteredFeature("CompareTakerFlowCross"), featureFlowCross = *getRegisteredFeature("FlowCross"), + featureCryptoConditionsSuite = *getRegisteredFeature("CryptoConditionsSuite"), fix1513 = *getRegisteredFeature("fix1513"), featureDepositAuth = *getRegisteredFeature("DepositAuth"), featureChecks = *getRegisteredFeature("Checks"),