mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 22:45: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;
|
cLog(lsWARNING) << "Removing stale proposal from " << peerID;
|
||||||
BOOST_FOREACH(u256_lct_pair& it, mDisputes)
|
BOOST_FOREACH(u256_lct_pair& it, mDisputes)
|
||||||
it.second->unVote(peerID);
|
it.second->unVote(peerID);
|
||||||
mPeerPositions.erase(it++);
|
it = mPeerPositions.erase(it);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // proposal is still fresh
|
{ // 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())
|
if (cit->second.isExpired())
|
||||||
{
|
{
|
||||||
++mapRemovals;
|
++mapRemovals;
|
||||||
mCache.erase(cit++);
|
cit = mCache.erase(cit);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
++cit;
|
++cit;
|
||||||
@@ -165,7 +165,7 @@ template<typename c_Key, typename c_Data> void TaggedCache<c_Key, c_Data>::sweep
|
|||||||
if (cit->second.isExpired())
|
if (cit->second.isExpired())
|
||||||
{
|
{
|
||||||
++mapRemovals;
|
++mapRemovals;
|
||||||
mCache.erase(cit++);
|
cit = mCache.erase(cit);
|
||||||
}
|
}
|
||||||
else // remains weakly cached
|
else // remains weakly cached
|
||||||
++cit;
|
++cit;
|
||||||
|
|||||||
Reference in New Issue
Block a user