From 5319edffb0a27f10a4abbbf7bd9c1475c5f6a54a Mon Sep 17 00:00:00 2001 From: JCW Date: Wed, 25 Jun 2025 11:28:04 +0100 Subject: [PATCH] Fix comments --- include/xrpl/protocol/Feature.h | 7 +++++++ include/xrpl/protocol/detail/features.macro | 7 +++++-- src/libxrpl/protocol/Feature.cpp | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/include/xrpl/protocol/Feature.h b/include/xrpl/protocol/Feature.h index b5d4c89330..75add39af9 100644 --- a/include/xrpl/protocol/Feature.h +++ b/include/xrpl/protocol/Feature.h @@ -61,6 +61,13 @@ * 2) The feature is not in the ledger (has always been marked as * Supported::no) and the code to support it has been removed * + * If we want to discontinue a feature that we've never fully supported and + * the feature has never been enabled, we should remove all the related + * code, and mark the feature as "abandoned". To do this: + * + * 1) Open features.macro, move the feature to the abandoned section and + * change the macro to XRPL_ABANDON + * * When a feature has been enabled for several years, the conditional code * may be removed, and the feature "retired". To retire a feature: * diff --git a/include/xrpl/protocol/detail/features.macro b/include/xrpl/protocol/detail/features.macro index f6ea6e2444..3584d8f8cf 100644 --- a/include/xrpl/protocol/detail/features.macro +++ b/include/xrpl/protocol/detail/features.macro @@ -26,6 +26,9 @@ #if !defined(XRPL_RETIRE) #error "undefined macro: XRPL_RETIRE" #endif +#if !defined(XRPL_ABANDON) +#error "undefined macro: XRPL_ABANDON" +#endif // Add new amendments to the top of this list. // Keep it sorted in reverse chronological order. @@ -131,8 +134,8 @@ XRPL_FIX (NFTokenDirV1, Supported::yes, VoteBehavior::Obsolete) XRPL_FEATURE(NonFungibleTokensV1, Supported::yes, VoteBehavior::Obsolete) XRPL_FEATURE(CryptoConditionsSuite, Supported::yes, VoteBehavior::Obsolete) -// The following amendments are never supported, never enabled, and -// we've abanded them. These features should never be in the ledge, +// The following amendments were never supported, never enabled, and +// we've abanded them. These features should never be in the ledger, // and we've removed all the related code. XRPL_ABANDON(OwnerPaysFee) diff --git a/src/libxrpl/protocol/Feature.cpp b/src/libxrpl/protocol/Feature.cpp index 654a129957..85dcb5f435 100644 --- a/src/libxrpl/protocol/Feature.cpp +++ b/src/libxrpl/protocol/Feature.cpp @@ -399,7 +399,7 @@ retireFeature(std::string const& name) } // Abandoned features are not in the ledger and have no code controlled by the -// feature. They are never supported, and do not need to be voted on. +// feature. They were never supported, and cannot be voted on. uint256 abandonFeature(std::string const& name) {