Merge branch 'ximinez/lending-refactoring-3' into ximinez/lending-refactoring-4

This commit is contained in:
Ed Hennis
2025-09-16 19:04:53 -04:00
committed by GitHub
6 changed files with 51 additions and 93 deletions

View File

@@ -34,7 +34,6 @@
#include <type_traits>
namespace ripple {
namespace detail {
struct epsilon_multiple

View File

@@ -41,7 +41,7 @@ namespace ripple {
assert(enforce)
There are several asserts (or XRPL_ASSERTs) in this file that check a variable
named `enforce` when an invariant fails. At first glace, those asserts may look
named `enforce` when an invariant fails. At first glance, those asserts may look
incorrect, but they are not.
Those asserts take advantage of two facts:
@@ -49,11 +49,11 @@ Those asserts take advantage of two facts:
2. Invariants should *never* fail, except in tests that specifically modify
the open ledger to break them.
To make it sort of a second-layer of invariant enforcement aimed at
_developers_. It's designed to fire if a developer writes code that violates an
invariant, and runs it in unit tests or a develop build that _does not have the
relevant amendments enabled_. It's intentionally a pain in the neck so that bad
code gets caught and fixed as early as possible.
This makes `assert(enforce)` sort of a second-layer of invariant enforcement
aimed at _developers_. It's designed to fire if a developer writes code that
violates an invariant, and runs it in unit tests or a develop build that _does
not have the relevant amendments enabled_. It's intentionally a pain in the neck
so that bad code gets caught and fixed as early as possible.
*/
enum Privilege {