mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Quick fix for the bug that was causing ledgers to diverge.
LES used an unordered map, causing the traverse of modified ledger nodes to be in random order. This meant different nodes would thread transactions differently, causing ledger divergence. This change switches the LES code to use a standard map. This adds more overhead to LES search functions (because ordered map operations like search and insert are more expensive than unordered map opreations, so it may be worth a separate ordering step just for calcRawMeta instead.
This commit is contained in:
@@ -18,7 +18,7 @@ SETUP_LOG();
|
||||
void TransactionEngine::txnWrite()
|
||||
{
|
||||
// Write back the account states
|
||||
for (boost::unordered_map<uint256, LedgerEntrySetEntry>::iterator it = mNodes.begin(), end = mNodes.end();
|
||||
for (std::map<uint256, LedgerEntrySetEntry>::iterator it = mNodes.begin(), end = mNodes.end();
|
||||
it != end; ++it)
|
||||
{
|
||||
const SLE::pointer& sleEntry = it->second.mEntry;
|
||||
|
||||
Reference in New Issue
Block a user