3#include <xrpl/protocol/Protocol.h>
36 auto it =
map_.find(seq);
38 if ((it ==
map_.end()) || it->second)
85 auto it =
map_.find(seq);
89 map_.emplace(seq,
false);
Keeps track of which ledgers haven't been fully saved.
std::condition_variable await_
std::map< LedgerIndex, bool > getSnapshot() const
Get a snapshot of the pending saves.
void finishWork(LedgerIndex seq)
Finish working on a ledger.
bool shouldWork(LedgerIndex seq, bool isSynchronous)
Check if a ledger should be dispatched.
bool startWork(LedgerIndex seq)
Start working on a ledger.
bool pending(LedgerIndex seq)
Return true if a ledger is in the progress of being saved.
std::map< LedgerIndex, bool > map_
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.