Refactor View classes:

The View hierarchy of classes is reorganized to include new
classes with member functions moved and renamed, to solve
defects in the original design:

OpenView accumulates raw state and tx changes and
can be applied to the base. ApplyView accumulates changes
for a single transaction, including metadata, and can be
applied to an OpenView. The Sandbox allows changes with
the option to apply or throw them out. The PaymentSandbox
provides a sandbox with account credit deferral.

Call sites are changed to use the class appropriate for
the task.
This commit is contained in:
Vinnie Falco
2015-07-04 10:55:07 -07:00
parent f3b172b0c9
commit 367c3a5bfc
116 changed files with 4392 additions and 3565 deletions

View File

@@ -39,8 +39,7 @@ getAccountObjects (Ledger const& ledger, AccountID const& account,
found = true;
}
auto dir = cachedRead(ledger, dirIndex,
getApp().getSLECache(), ltDIR_NODE);
auto dir = cachedRead(ledger, dirIndex, ltDIR_NODE);
if (! dir)
return false;
@@ -62,8 +61,7 @@ getAccountObjects (Ledger const& ledger, AccountID const& account,
for (; iter != entries.end (); ++iter)
{
auto const sleNode = cachedRead(ledger, *iter,
getApp().getSLECache());
auto const sleNode = cachedRead(ledger, *iter );
if (type == ltINVALID || sleNode->getType () == type)
{
jvObjects.append (sleNode->getJson (0));
@@ -88,8 +86,7 @@ getAccountObjects (Ledger const& ledger, AccountID const& account,
return true;
dirIndex = getDirNodeIndex (rootDirIndex, nodeIndex);
dir = cachedRead(ledger, dirIndex,
getApp().getSLECache(), ltDIR_NODE);
dir = cachedRead(ledger, dirIndex, ltDIR_NODE);
if (! dir)
return true;