Add 'dropCache' function to remove extraneous nodes from memory.

This commit is contained in:
JoelKatz
2013-01-27 13:55:06 -08:00
parent 43cc001eb9
commit bdd5d4af9f
3 changed files with 19 additions and 0 deletions

View File

@@ -851,6 +851,15 @@ bool SHAMap::getPath(const uint256& index, std::vector< std::vector<unsigned cha
return true;
}
void SHAMap::dropCache()
{ // CAUTION: Changes can be lost
boost::recursive_mutex::scoped_lock sl(mLock);
mTNByID.clear();
if (root)
mTNByID[*root] = root;
}
void SHAMap::dump(bool hash)
{
#if 0