mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
More work on ledger sequencing:
Track whether ledger is accepted. Assert on modifications to an accepted ledger. Save accepted ledgers to DB. Load ledger by hash/index. Ledger history functions, ledger canonicalization. 'Push' ledger to history.
This commit is contained in:
@@ -5,12 +5,11 @@
|
||||
|
||||
class LedgerHistory
|
||||
{
|
||||
boost::recursive_mutex mLock;
|
||||
|
||||
std::map<uint32, Ledger::pointer> mLedgersByIndex;
|
||||
std::map<uint256, Ledger::pointer> mLedgersByHash;
|
||||
|
||||
bool loadClosedLedger(uint32 index);
|
||||
bool loadLedger(const uint256& hash);
|
||||
|
||||
public:
|
||||
LedgerHistory() { ; }
|
||||
|
||||
@@ -19,6 +18,7 @@ public:
|
||||
|
||||
Ledger::pointer getLedgerBySeq(uint32 index);
|
||||
Ledger::pointer getLedgerByHash(const uint256& hash);
|
||||
Ledger::pointer canonicalizeLedger(Ledger::pointer, bool cache);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user