When an object is found in the epehermal DB, put it in the cache.

This commit is contained in:
JoelKatz
2013-06-05 13:38:58 -07:00
parent 04b6eacf8e
commit d3e7fb5ba0

View File

@@ -192,7 +192,10 @@ HashedObject::pointer HashedObjectStore::retrieveLevelDB(const uint256& hash)
{
obj = LLRetrieve(hash, theApp->getEphemeralLDB());
if (obj)
{
mCache.canonicalize(hash, obj);
return obj;
}
}
{
@@ -365,7 +368,10 @@ HashedObject::pointer HashedObjectStore::retrieveSQLite(const uint256& hash)
{
obj = LLRetrieve(hash, theApp->getEphemeralLDB());
if (obj)
{
mCache.canonicalize(hash, obj);
return obj;
}
}
if (!theApp || !theApp->getHashNodeDB())