mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Refactor MetaView (RIPD-954):
Obsolete functionality is removed. DeferredCredits is moved to a new class PaymentView, and used in RippleCalc.
This commit is contained in:
@@ -483,8 +483,9 @@ Json::Value PathRequest::doUpdate (RippleLineCache::ref cache, bool fast)
|
||||
|
||||
if (valid)
|
||||
{
|
||||
MetaView sandbox(
|
||||
cache->getLedger(), tapNONE);
|
||||
boost::optional<PaymentView> sandbox;
|
||||
sandbox.emplace(cache->getLedger(), tapNONE);
|
||||
|
||||
auto& sourceAccount = !isXRP (currIssuer.account)
|
||||
? currIssuer.account
|
||||
: isXRP (currIssuer.currency)
|
||||
@@ -496,7 +497,7 @@ Json::Value PathRequest::doUpdate (RippleLineCache::ref cache, bool fast)
|
||||
m_journal.debug << iIdentifier
|
||||
<< " Paths found, calling rippleCalc";
|
||||
auto rc = path::RippleCalc::rippleCalculate (
|
||||
sandbox,
|
||||
*sandbox,
|
||||
saMaxAmount,
|
||||
saDstAmount,
|
||||
*raDstAccount,
|
||||
@@ -509,9 +510,9 @@ Json::Value PathRequest::doUpdate (RippleLineCache::ref cache, bool fast)
|
||||
m_journal.debug
|
||||
<< iIdentifier << " Trying with an extra path element";
|
||||
spsPaths.push_back (fullLiquidityPath);
|
||||
reconstruct(sandbox, cache->getLedger (), tapNONE);
|
||||
sandbox.emplace(cache->getLedger (), tapNONE);
|
||||
rc = path::RippleCalc::rippleCalculate (
|
||||
sandbox,
|
||||
*sandbox,
|
||||
saMaxAmount,
|
||||
saDstAmount,
|
||||
*raDstAccount,
|
||||
|
||||
Reference in New Issue
Block a user