Don't duplicate transactions in the DB.

This commit is contained in:
JoelKatz
2013-03-03 05:03:48 -08:00
parent 19c7406b96
commit 23569c32aa

View File

@@ -465,7 +465,7 @@ void Ledger::saveAcceptedLedger(bool fromConsensus, LoadEvent::pointer event)
if (!accts.empty())
{
std::string sql = "INSERT INTO AccountTransactions (TransID, Account, LedgerSeq) VALUES ";
std::string sql = "INSERT OR REPLACE INTO AccountTransactions (TransID, Account, LedgerSeq) VALUES ";
bool first = true;
for (std::vector<RippleAddress>::const_iterator it = accts.begin(), end = accts.end(); it != end; ++it)
{