AI review feedback: function overload, merge error, clarify comment

This commit is contained in:
Ed Hennis
2026-04-16 19:05:00 -04:00
parent 7e1227766b
commit 01b98dfe36
3 changed files with 15 additions and 3 deletions

View File

@@ -35,7 +35,20 @@ namespace ripple {
* context.
*/
bool
isFeatureEnabled(uint256 const& feature, bool resultIfNoRules = false);
isFeatureEnabled(uint256 const& feature, bool resultIfNoRules);
/** Check whether a feature is enabled in the current ledger rules
*
* @param feature The feature to be tested.
*
* Returns false if no global Rules object is available. i.e. Outside of
* a Transactor context
*/
bool
isFeatureEnabled(uint256 const& feature)
{
return isFeatureEnabled(feature, false);
}
class DigestAwareReadView;

View File

@@ -124,7 +124,7 @@ class Invariants_test : public beast::unit_test::suite
jlog};
// Invariants normally run in the Transaction's "apply" (operator())
// context, and can access global Rules. (Not dependent on amendments.)
// context, and can always access global Rules.
CurrentTransactionRulesGuard const rg(ov.rules());
BEAST_EXPECT(precheck(A1, A2, ac));

View File

@@ -413,7 +413,6 @@ NoZeroEscrow::visitEntry(
if (auto const locked = (*after)[~sfLockedAmount])
{
checkAmount(*locked);
bad_ = outstanding < *locked;
bool const isBad = outstanding < *locked;
if (overwriteFixEnabled)
bad_ |= isBad;