mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add 'dropCache' function to remove extraneous nodes from memory.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user