mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Improve ledger replay logic
Build a replay structure holding the transactions in execution order along with the close time. Use this structure when replaying a ledger close.
This commit is contained in:
@@ -96,6 +96,9 @@ public:
|
||||
|
||||
CanonicalTXSet mHeldTransactions;
|
||||
|
||||
// A set of transactions to replay during the next close
|
||||
std::unique_ptr<LedgerReplay> replayData;
|
||||
|
||||
LockType mCompleteLock;
|
||||
RangeSet mCompleteLedgers;
|
||||
|
||||
@@ -1538,6 +1541,16 @@ public:
|
||||
mLedgerHistory.clearLedgerCachePrior (seq);
|
||||
}
|
||||
|
||||
void takeReplay (std::unique_ptr<LedgerReplay> replay) override
|
||||
{
|
||||
replayData = std::move (replay);
|
||||
}
|
||||
|
||||
std::unique_ptr<LedgerReplay> releaseReplay () override
|
||||
{
|
||||
return std::move (replayData);
|
||||
}
|
||||
|
||||
// Fetch packs:
|
||||
void gotFetchPack (
|
||||
bool progress,
|
||||
|
||||
Reference in New Issue
Block a user