Do it the way everyone else does it -- more likely to work.

This commit is contained in:
JoelKatz
2012-01-30 17:58:29 -08:00
parent 94d61f67a8
commit 895a51319d

View File

@@ -478,9 +478,7 @@ Ledger::pointer Ledger::switchPreviousLedger(Ledger::pointer oldPrevious, Ledger
if(!tx || newLedger->addTransaction(tx))
{
count++;
std::map<uint256, std::pair<Transaction::pointer, Transaction::pointer> >::iterator it2=it;
++it;
TxnDiff.erase(it2);
TxnDiff.erase(it++);
}
else ++it;
}
@@ -509,9 +507,7 @@ Ledger::pointer Ledger::switchPreviousLedger(Ledger::pointer oldPrevious, Ledger
if(newLedger->addTransaction(it->second))
{
count++;
std::map<uint256, Transaction::pointer>::iterator it2=it;
++it;
txnMap.erase(it2);
txnMap.erase(it++);
}
else ++it;
}