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:
Vinnie Falco
2015-06-24 05:07:20 -07:00
parent f535304e1b
commit 48d6a4ab6a
53 changed files with 651 additions and 782 deletions

View File

@@ -19,7 +19,6 @@
#include <BeastConfig.h>
#include <ripple/app/paths/cursor/RippleLiquidity.h>
#include <ripple/ledger/ViewAPI.h>
#include <ripple/basics/Log.h>
namespace ripple {
@@ -196,7 +195,7 @@ TER PathCursor::deliverNodeForward (
// Output: Debit offer owner, send XRP or non-XPR to next
// account.
resultCode = accountSend (ledger(),
resultCode = accountSend(view(),
node().offerOwnerAccount_,
nextNode().account_,
saOutPassAct);
@@ -253,7 +252,7 @@ TER PathCursor::deliverNodeForward (
auto const& id = isXRP(node().issue_) ?
xrpAccount() : node().issue_.account;
auto outPassTotal = saOutPassAct + saOutPassFees;
accountSend (ledger(),
accountSend(view(),
node().offerOwnerAccount_,
id,
outPassTotal);
@@ -287,7 +286,7 @@ TER PathCursor::deliverNodeForward (
{
auto id = !isXRP(previousNode().issue_.currency) ?
uInAccountID : xrpAccount();
resultCode = accountSend (ledger(),
resultCode = accountSend(view(),
id,
node().offerOwnerAccount_,
saInPassAct);
@@ -317,7 +316,7 @@ TER PathCursor::deliverNodeForward (
node().sleOffer->setFieldAmount (sfTakerGets, saTakerGetsNew);
node().sleOffer->setFieldAmount (sfTakerPays, saTakerPaysNew);
ledger().update (node().sleOffer);
view().update (node().sleOffer);
if (saOutPassAct == saOutFunded || saTakerGetsNew == zero)
{