mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Implement ledger forward replay
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <ripple/app/ledger/InboundLedgers.h>
|
||||
#include <ripple/app/ledger/InboundTransactions.h>
|
||||
#include <ripple/app/ledger/LedgerMaster.h>
|
||||
#include <ripple/app/ledger/LedgerReplayer.h>
|
||||
#include <ripple/app/ledger/LedgerToJson.h>
|
||||
#include <ripple/app/ledger/OpenLedger.h>
|
||||
#include <ripple/app/ledger/OrderBookDB.h>
|
||||
@@ -59,6 +60,7 @@
|
||||
#include <ripple/nodestore/DummyScheduler.h>
|
||||
#include <ripple/overlay/Cluster.h>
|
||||
#include <ripple/overlay/PeerReservationTable.h>
|
||||
#include <ripple/overlay/PeerSet.h>
|
||||
#include <ripple/overlay/make_Overlay.h>
|
||||
#include <ripple/protocol/BuildInfo.h>
|
||||
#include <ripple/protocol/Feature.h>
|
||||
@@ -195,6 +197,7 @@ public:
|
||||
std::unique_ptr<LedgerMaster> m_ledgerMaster;
|
||||
std::unique_ptr<InboundLedgers> m_inboundLedgers;
|
||||
std::unique_ptr<InboundTransactions> m_inboundTransactions;
|
||||
std::unique_ptr<LedgerReplayer> m_ledgerReplayer;
|
||||
TaggedCache<uint256, AcceptedLedger> m_acceptedLedgerCache;
|
||||
std::unique_ptr<NetworkOPs> m_networkOPs;
|
||||
std::unique_ptr<Cluster> cluster_;
|
||||
@@ -367,6 +370,12 @@ public:
|
||||
gotTXSet(set, fromAcquire);
|
||||
}))
|
||||
|
||||
, m_ledgerReplayer(std::make_unique<LedgerReplayer>(
|
||||
*this,
|
||||
*m_inboundLedgers,
|
||||
make_PeerSetBuilder(*this),
|
||||
*m_jobQueue))
|
||||
|
||||
, m_acceptedLedgerCache(
|
||||
"AcceptedLedger",
|
||||
4,
|
||||
@@ -583,6 +592,12 @@ public:
|
||||
return *m_ledgerMaster;
|
||||
}
|
||||
|
||||
LedgerReplayer&
|
||||
getLedgerReplayer() override
|
||||
{
|
||||
return *m_ledgerReplayer;
|
||||
}
|
||||
|
||||
InboundLedgers&
|
||||
getInboundLedgers() override
|
||||
{
|
||||
@@ -1270,6 +1285,7 @@ public:
|
||||
getTempNodeCache().sweep();
|
||||
getValidations().expire();
|
||||
getInboundLedgers().sweep();
|
||||
getLedgerReplayer().sweep();
|
||||
m_acceptedLedgerCache.sweep();
|
||||
cachedSLEs_.expire();
|
||||
|
||||
@@ -2022,7 +2038,8 @@ ApplicationImp::loadOldLedger(
|
||||
hash,
|
||||
0,
|
||||
InboundLedger::Reason::GENERIC,
|
||||
stopwatch());
|
||||
stopwatch(),
|
||||
make_DummyPeerSet(*this));
|
||||
if (il->checkLocal())
|
||||
loadLedger = il->getLedger();
|
||||
}
|
||||
@@ -2065,7 +2082,8 @@ ApplicationImp::loadOldLedger(
|
||||
replayLedger->info().parentHash,
|
||||
0,
|
||||
InboundLedger::Reason::GENERIC,
|
||||
stopwatch());
|
||||
stopwatch(),
|
||||
make_DummyPeerSet(*this));
|
||||
|
||||
if (il->checkLocal())
|
||||
loadLedger = il->getLedger();
|
||||
|
||||
Reference in New Issue
Block a user