mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Don't let the ripple address cache grow infinitely.
This commit is contained in:
@@ -318,6 +318,8 @@ std::string RippleAddress::humanAccountID() const
|
||||
boost::unordered_map< std::vector<unsigned char>, std::string >::iterator it = rncMap.find(vchData);
|
||||
if (it != rncMap.end())
|
||||
return it->second;
|
||||
if (rncMap.size() > 10000)
|
||||
rncMap.clear();
|
||||
return rncMap[vchData] = ToString();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user