mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-07 02:36:47 +00:00
Fix clang-tidy issues, and more AI complaints
This commit is contained in:
@@ -38,12 +38,20 @@ setCurrentTransactionRules(std::optional<Rules> r)
|
||||
// Make global changes associated with the rules before the value is moved.
|
||||
// Push the appropriate setting, instead of having the class pull every time
|
||||
// the value is needed. That could get expensive fast.
|
||||
|
||||
// The improved accuracy that will come from enabling large
|
||||
// mantissas is a goal separate from SAV and LP. It was originally
|
||||
// only tied to those two amendments to avoid needing a new
|
||||
// amendment of it's own, and because they require that behavior.
|
||||
// Because fixCleanup3_2_0 fixes a separate bug related to the large
|
||||
// mantissas, that can take precedence and activate the large
|
||||
// mantissas even in the absence of the other two amendments.
|
||||
bool const enableCuspRoundingFix = !r || r->enabled(fixCleanup3_2_0);
|
||||
bool const enableLargeNumbers = enableCuspRoundingFix ||
|
||||
bool const enableVaultNumbers = enableCuspRoundingFix ||
|
||||
(r->enabled(featureSingleAssetVault) || r->enabled(featureLendingProtocol));
|
||||
Number::setMantissaScale(
|
||||
enableCuspRoundingFix ? MantissaRange::MantissaScale::Large
|
||||
: enableLargeNumbers ? MantissaRange::MantissaScale::LargeLegacy
|
||||
: enableVaultNumbers ? MantissaRange::MantissaScale::LargeLegacy
|
||||
: MantissaRange::MantissaScale::Small);
|
||||
|
||||
*getCurrentTransactionRulesRef() = std::move(r);
|
||||
|
||||
Reference in New Issue
Block a user