Refactor Ledger:

* Consolidate constructors
* Use pointer/size instead of Serializer
* Factor out PendingSaves
* Make some members free functions
* Reduce size of constructor initializer lists
This commit is contained in:
Vinnie Falco
2015-05-18 17:17:53 -07:00
parent 36ac3bc672
commit 860ab3523c
17 changed files with 304 additions and 175 deletions

View File

@@ -18,6 +18,7 @@
//==============================================================================
#include <BeastConfig.h>
#include <ripple/app/ledger/LedgerFees.h>
#include <ripple/rpc/impl/TransactionSign.h>
#include <ripple/rpc/impl/KeypairForSignature.h>
#include <ripple/app/paths/FindPaths.h>
@@ -172,7 +173,8 @@ std::uint64_t TxnSignApiFacade::scaleFeeBase (std::uint64_t fee) const
if (!ledger_) // Unit testing.
return fee;
return ledger_->scaleFeeBase (fee);
return ripple::scaleFeeBase(
getApp().getFeeTrack(), *ledger_, fee);
}
std::uint64_t
@@ -181,7 +183,9 @@ TxnSignApiFacade::scaleFeeLoad (std::uint64_t fee, bool bAdmin) const
if (!ledger_) // Unit testing.
return fee;
return ledger_->scaleFeeLoad (fee, bAdmin);
return ripple::scaleFeeLoad (
getApp().getFeeTrack(),
*ledger_, fee, bAdmin);
}
bool TxnSignApiFacade::hasAccountRoot () const