Improve Invariant check handling if not in Transactor context

- Adds an option to isFeatureEnabled to return true if no global rules
  set. Can be used for functionality that uses the post-amendment
  behavior when called outside of a Transactor context.
This commit is contained in:
Ed Hennis
2026-04-15 16:17:56 -04:00
parent c86e8ce532
commit be0e099386
3 changed files with 13 additions and 6 deletions

View File

@@ -8,8 +8,13 @@
namespace xrpl {
/** Check whether a feature is enabled in the current ledger rules
*
* @param feature The feature to be tested.
* @param resultIfNoRules What to return if called from outside a Transactor context.
*/
bool
isFeatureEnabled(uint256 const& feature);
isFeatureEnabled(uint256 const& feature, bool resultIfNoRules = false);
class DigestAwareReadView;