mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Batched transaction application:
Applying multiple transactions to the open ledger reduces SHAMap modification overhead.
This commit is contained in:
committed by
Nik Bougalis
parent
4225b78bf5
commit
ca800f9e8d
@@ -21,7 +21,6 @@
|
||||
#include <ripple/app/ledger/LedgerMaster.h>
|
||||
#include <ripple/app/ledger/InboundLedgers.h>
|
||||
#include <ripple/app/ledger/LedgerHistory.h>
|
||||
#include <ripple/app/ledger/LedgerHolder.h>
|
||||
#include <ripple/app/ledger/OrderBookDB.h>
|
||||
#include <ripple/app/ledger/PendingSaves.h>
|
||||
#include <ripple/app/ledger/impl/LedgerCleaner.h>
|
||||
@@ -398,27 +397,6 @@ public:
|
||||
mBuildingLedgerSeq.store (i);
|
||||
}
|
||||
|
||||
TER doTransaction (STTx::ref txn, TransactionEngineParams params, bool& didApply)
|
||||
{
|
||||
Ledger::pointer ledger;
|
||||
TransactionEngine engine;
|
||||
TER result;
|
||||
didApply = false;
|
||||
|
||||
{
|
||||
ScopedLockType sl (m_mutex);
|
||||
ledger = mCurrentLedger.getMutable ();
|
||||
engine.setLedger (ledger);
|
||||
std::tie(result, didApply) = engine.applyTransaction (*txn, params);
|
||||
}
|
||||
if (didApply)
|
||||
{
|
||||
mCurrentLedger.set (ledger);
|
||||
getApp().getOPs ().pubProposedTransaction (ledger, txn, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool haveLedgerRange (std::uint32_t from, std::uint32_t to)
|
||||
{
|
||||
ScopedLockType sl (mCompleteLock);
|
||||
@@ -1371,6 +1349,11 @@ public:
|
||||
return mCurrentLedger.get ();
|
||||
}
|
||||
|
||||
LedgerHolder& getCurrentLedgerHolder() override
|
||||
{
|
||||
return mCurrentLedger;
|
||||
}
|
||||
|
||||
// The finalized ledger is the last closed/accepted ledger
|
||||
Ledger::pointer getClosedLedger ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user