Move all SQL operations on ledger close into the ledger code so we can

accept ledgers without having to participate in the consensus process. We'll
need this when we implement "catch up".

Move AcctTx into the same connection as Txn so they can be part of a single
transaction.

Dispatch ledger accept synchronization functions into a detached thread so it
doesn't stall our I/O engine.
This commit is contained in:
JoelKatz
2012-06-09 22:01:31 -07:00
parent 16f68296c4
commit 2d49cacd29
8 changed files with 52 additions and 52 deletions

View File

@@ -542,8 +542,8 @@ std::vector< std::pair<uint32, uint256> >
" WHERE Account = '%s' AND LedgerSeq <= '%d' AND LedgerSeq >= '%d' ORDER BY LedgerSeq LIMIT 1000")
% account.humanAccountID() % maxLedger % minLedger);
Database *db = theApp->getAcctTxnDB()->getDB();
ScopedLock dbLock = theApp->getAcctTxnDB()->getDBLock();
Database *db = theApp->getTxnDB()->getDB();
ScopedLock dbLock = theApp->getTxnDB()->getDBLock();
SQL_FOREACH(db, sql)
{