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:
JoelKatz
2011-12-13 18:05:29 -08:00
parent 80a6f7e5ad
commit 4b5bc85a0d
6 changed files with 169 additions and 30 deletions

View File

@@ -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