Add a framework for detecting databases that need updating.

Put transaction from account_tx command in transaction application sequence.
CAUTION: This modifies your databases and will cause a delay on your next startup.
This commit is contained in:
JoelKatz
2013-04-01 19:03:28 -07:00
parent 1725b5df48
commit 5cc9314d03
12 changed files with 130 additions and 4 deletions

View File

@@ -479,7 +479,7 @@ void Ledger::saveAcceptedLedger(Job&, bool fromConsensus)
const std::vector<RippleAddress>& accts = vt.second.getAffected();
if (!accts.empty())
{
std::string sql = "INSERT INTO AccountTransactions (TransID, Account, LedgerSeq) VALUES ";
std::string sql = "INSERT INTO AccountTransactions (TransID, Account, LedgerSeq, TxnSeq) VALUES ";
bool first = true;
for (std::vector<RippleAddress>::const_iterator it = accts.begin(), end = accts.end(); it != end; ++it)
{
@@ -495,6 +495,8 @@ void Ledger::saveAcceptedLedger(Job&, bool fromConsensus)
sql += it->humanAccountID();
sql += "',";
sql += boost::lexical_cast<std::string>(getLedgerSeq());
sql += ",";
sql += boost::lexical_cast<std::string>(vt.second.getTxnSeq());
sql += ")";
}
sql += ";";