Add a LoanBroker invariant to compare CoverAvailable to balance

- Ensures that LoanBroker.CoverAvailable is never less than the
  pseudo-account balance for the Vault asset.
This commit is contained in:
Ed Hennis
2025-11-24 16:24:35 -05:00
parent 1ba010031d
commit a7af773dd8
4 changed files with 111 additions and 9 deletions

View File

@@ -564,7 +564,7 @@ STAmount::clear()
{
// The -100 is used to allow 0 to sort less than a small positive values
// which have a negative exponent.
mOffset = native() ? 0 : -100;
mOffset = integral() ? 0 : -100;
mValue = 0;
mIsNegative = false;
}