mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-01 08:25:51 +00:00
Do it the way everyone else does it -- more likely to work.
This commit is contained in:
@@ -478,9 +478,7 @@ Ledger::pointer Ledger::switchPreviousLedger(Ledger::pointer oldPrevious, Ledger
|
|||||||
if(!tx || newLedger->addTransaction(tx))
|
if(!tx || newLedger->addTransaction(tx))
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
std::map<uint256, std::pair<Transaction::pointer, Transaction::pointer> >::iterator it2=it;
|
TxnDiff.erase(it++);
|
||||||
++it;
|
|
||||||
TxnDiff.erase(it2);
|
|
||||||
}
|
}
|
||||||
else ++it;
|
else ++it;
|
||||||
}
|
}
|
||||||
@@ -509,9 +507,7 @@ Ledger::pointer Ledger::switchPreviousLedger(Ledger::pointer oldPrevious, Ledger
|
|||||||
if(newLedger->addTransaction(it->second))
|
if(newLedger->addTransaction(it->second))
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
std::map<uint256, Transaction::pointer>::iterator it2=it;
|
txnMap.erase(it++);
|
||||||
++it;
|
|
||||||
txnMap.erase(it2);
|
|
||||||
}
|
}
|
||||||
else ++it;
|
else ++it;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user