mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-21 14:20:56 +00:00
Merge remote-tracking branch 'origin/tapanito/fix-lending-cross-scale' into tapanito/vault-add-assets-helper
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <xrpl/basics/Log.h>
|
||||
#include <xrpl/basics/Number.h>
|
||||
#include <xrpl/beast/utility/Zero.h>
|
||||
#include <xrpl/beast/utility/instrumentation.h>
|
||||
#include <xrpl/core/ServiceRegistry.h>
|
||||
#include <xrpl/ledger/ApplyView.h>
|
||||
#include <xrpl/ledger/View.h>
|
||||
@@ -189,6 +190,11 @@ LoanManage::defaultLoan(
|
||||
// required to paper over the resulting cross-side mismatch -- a snap
|
||||
// that itself minted phantom assets on sfAssetsTotal. See the
|
||||
// sibling change in LoanPay for the same fix on the payment path.
|
||||
//
|
||||
// The Number-precision guard `T - A >= totalDefaultAmount` below is
|
||||
// exactly sufficient: loanVaultExposure returns a difference of vault-
|
||||
// associated STNumber fields (IOU-normalized via associateAsset), so
|
||||
// its STAmount promotion round-trips losslessly with no writeOff slack.
|
||||
bool const useUnifiedAssetArithmetic = view.rules().enabled(fixCleanup3_4_0);
|
||||
|
||||
if (useUnifiedAssetArithmetic)
|
||||
|
||||
Reference in New Issue
Block a user