mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Refine View interfaces:
This shores up the View interface support for contextual transaction processing by putting params in the View, and provides support for replacing the open ledger with the open MetaView. Transaction metadata is now part of the View interface. Stacked MetaViews correctly apply their transaction metadata to the parent. * Add lastCloseTime to View * Add insertTx to View, implement in MetaView * Add View::txExists for transaction checking * Add Fees to View, cache fees in Ledger and MetaView * Use ViewFlags in View * Use tapENABLE_TESTING flag for features * Use cached Fees in View * Rename to ViewFlags * Move FreezeHandling to View.h, remove ViewAPIBasics.h * Remove BasicView::parent hack * Remove calls to getLedger in Transactors
This commit is contained in:
committed by
Nik Bougalis
parent
2fc8d70655
commit
57689c4e66
@@ -350,7 +350,9 @@ public:
|
||||
ScopedLockType sl (m_mutex);
|
||||
|
||||
// Start with a mutable snapshot of the open ledger
|
||||
TransactionEngine engine (mCurrentLedger.getMutable ());
|
||||
auto const ledger =
|
||||
mCurrentLedger.getMutable();
|
||||
TransactionEngine engine (ledger);
|
||||
|
||||
int recovers = 0;
|
||||
|
||||
@@ -358,10 +360,10 @@ public:
|
||||
{
|
||||
try
|
||||
{
|
||||
TransactionEngineParams tepFlags = tapOPEN_LEDGER;
|
||||
ViewFlags tepFlags = tapOPEN_LEDGER;
|
||||
|
||||
if (getApp().getHashRouter ().addSuppressionFlags (it.first.getTXID (), SF_SIGGOOD))
|
||||
tepFlags = static_cast<TransactionEngineParams> (tepFlags | tapNO_CHECK_SIGN);
|
||||
tepFlags = static_cast<ViewFlags> (tepFlags | tapNO_CHECK_SIGN);
|
||||
|
||||
auto ret = engine.applyTransaction (*it.second, tepFlags);
|
||||
|
||||
@@ -382,8 +384,8 @@ public:
|
||||
CondLog (recovers != 0, lsINFO, LedgerMaster) << "Recovered " << recovers << " held transactions";
|
||||
|
||||
// VFALCO TODO recreate the CanonicalTxSet object instead of resetting it
|
||||
mHeldTransactions.reset (engine.getLedger()->getHash ());
|
||||
mCurrentLedger.set (engine.getLedger ());
|
||||
mHeldTransactions.reset (ledger->getHash ());
|
||||
mCurrentLedger.set (ledger);
|
||||
}
|
||||
|
||||
LedgerIndex getBuildingLedger ()
|
||||
|
||||
Reference in New Issue
Block a user