20 #ifndef RIPPLE_APP_LEDGER_LEDGERDELTAACQUIRE_H_INCLUDED
21 #define RIPPLE_APP_LEDGER_LEDGERDELTAACQUIRE_H_INCLUDED
23 #include <ripple/app/ledger/InboundLedger.h>
24 #include <ripple/app/ledger/Ledger.h>
25 #include <ripple/app/ledger/impl/TimeoutCounter.h>
26 #include <ripple/basics/CountedObject.h>
27 #include <ripple/basics/base_uint.h>
std::vector< OnDeltaDataCB > dataReadyCallbacks_
void notify(ScopedLockType &sl)
Call the OnDeltaDataCB callbacks.
std::unique_lock< std::recursive_mutex > ScopedLockType
Tracks the number of instances of an object.
const std::uint32_t ledgerSeq_
std::map< std::uint32_t, std::shared_ptr< STTx const > > orderedTxns_
void processData(LedgerInfo const &info, std::map< std::uint32_t, std::shared_ptr< STTx const >> &&orderedTxns)
Process the data extracted from a peer's reply.
~LedgerDeltaAcquire() override
std::unique_ptr< PeerSet > peerSet_
void init(int numPeers)
Start the LedgerDeltaAcquire task.
std::shared_ptr< Ledger const > fullLedger_
InboundLedgers & inboundLedgers_
This class is an "active" object.
Manage the retrieval of a ledger delta (header and transactions) from the network.
std::shared_ptr< Ledger const > replayTemp_
std::set< InboundLedger::Reason > reasons_
void trigger(std::size_t limit, ScopedLockType &sl)
Trigger another round.
Ledger replay client side.
void addDataCallback(InboundLedger::Reason reason, OnDeltaDataCB &&cb)
Add a reason and a callback to the LedgerDeltaAcquire subtask.
Manages the lifetime of inbound ledgers.
std::weak_ptr< TimeoutCounter > pmDowncast() override
Return a weak pointer to this.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::uint32_t noFeaturePeerCount
std::shared_ptr< Ledger const > tryBuild(std::shared_ptr< Ledger const > const &parent)
Try to build the ledger if not already.
Information about the notional ledger backing the view.
LedgerDeltaAcquire(Application &app, InboundLedgers &inboundLedgers, uint256 const &ledgerHash, std::uint32_t ledgerSeq, std::unique_ptr< PeerSet > peerSet)
Constructor.
void onTimer(bool progress, ScopedLockType &peerSetLock) override
Hook called from invokeOnTimer().
void onLedgerBuilt(ScopedLockType &sl, std::optional< InboundLedger::Reason > reason={})
Process a newly built ledger, such as store it.