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

@@ -112,8 +112,7 @@ void TxnSignApiFacade::snapshotAccountState (AccountID const& accountID)
ledger_ = netOPs_->getCurrentLedger ();
accountID_ = accountID;
sle_ = cachedRead(*ledger_,
keylet::account(accountID_).key,
getApp().getSLECache(), ltACCOUNT_ROOT);
keylet::account(accountID_).key, ltACCOUNT_ROOT);
}
bool TxnSignApiFacade::isValidAccount () const
@@ -256,8 +255,7 @@ error_code_i TxnSignApiFacade::multiAcctMatchesPubKey (
// accountID. It's okay if the account root is not available,
// since they might be signing with a phantom (unfunded) account.
accountState = cachedRead(*ledger_,
keylet::account(accountID).key,
getApp().getSLECache(), ltACCOUNT_ROOT);
keylet::account(accountID).key, ltACCOUNT_ROOT);
}
return acctMatchesPubKey (accountState, accountID, publicKey);