Don't let the ripple address cache grow infinitely.

This commit is contained in:
JoelKatz
2013-04-09 17:00:14 -07:00
parent dbff221da9
commit 21ead9e866

View File

@@ -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();
}