mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 14:35:52 +00:00
Fig a bug in the way we traverse TaggedCaches and a similar bug in mPeerPositions.
This commit is contained in:
@@ -728,7 +728,7 @@ void LedgerConsensus::updateOurPositions()
|
||||
cLog(lsWARNING) << "Removing stale proposal from " << peerID;
|
||||
BOOST_FOREACH(u256_lct_pair& it, mDisputes)
|
||||
it.second->unVote(peerID);
|
||||
mPeerPositions.erase(it++);
|
||||
it = mPeerPositions.erase(it);
|
||||
}
|
||||
else
|
||||
{ // proposal is still fresh
|
||||
|
||||
@@ -152,7 +152,7 @@ template<typename c_Key, typename c_Data> void TaggedCache<c_Key, c_Data>::sweep
|
||||
if (cit->second.isExpired())
|
||||
{
|
||||
++mapRemovals;
|
||||
mCache.erase(cit++);
|
||||
cit = mCache.erase(cit);
|
||||
}
|
||||
else
|
||||
++cit;
|
||||
@@ -165,7 +165,7 @@ template<typename c_Key, typename c_Data> void TaggedCache<c_Key, c_Data>::sweep
|
||||
if (cit->second.isExpired())
|
||||
{
|
||||
++mapRemovals;
|
||||
mCache.erase(cit++);
|
||||
cit = mCache.erase(cit);
|
||||
}
|
||||
else // remains weakly cached
|
||||
++cit;
|
||||
|
||||
Reference in New Issue
Block a user