Files
rippled/LedgerHistory.h
2011-12-13 12:17:51 -08:00

24 lines
515 B
C++

#ifndef __LEDGERHISTORY__
#define __LEDGERHISTORY__
#include "Ledger.h"
class LedgerHistory
{
std::map<uint32, Ledger::pointer> mLedgersByIndex;
std::map<uint256, Ledger::pointer> mLedgersByHash;
bool loadClosedLedger(uint32 index);
bool loadLedger(const uint256& hash);
public:
LedgerHistory() { ; }
void addLedger(Ledger::pointer ledger);
void addAcceptedLedger(Ledger::pointer ledger);
Ledger::pointer getLedgerBySeq(uint32 index);
Ledger::pointer getLedgerByHash(const uint256& hash);
};
#endif