mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Merge branch 'develop' of github.com:jedmccaleb/NewCoin into develop
This commit is contained in:
@@ -63,7 +63,6 @@ bool HashedObjectStore::store(HashedObjectType type, uint32 index,
|
|||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mNegativeCache.del(hash);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,19 +76,13 @@ HashedObject::pointer HashedObjectStore::retrieve(const uint256& hash)
|
|||||||
if (obj)
|
if (obj)
|
||||||
return obj;
|
return obj;
|
||||||
|
|
||||||
if (mNegativeCache.isPresent(hash))
|
|
||||||
return obj;
|
|
||||||
|
|
||||||
if (!theApp || !theApp->getHashNodeDB())
|
if (!theApp || !theApp->getHashNodeDB())
|
||||||
return obj;
|
return obj;
|
||||||
|
|
||||||
std::string sData;
|
std::string sData;
|
||||||
leveldb::Status st = theApp->getHashNodeDB()->Get(leveldb::ReadOptions(), hash.GetHex(), &sData);
|
leveldb::Status st = theApp->getHashNodeDB()->Get(leveldb::ReadOptions(), hash.GetHex(), &sData);
|
||||||
if (!st.ok())
|
if (!st.ok())
|
||||||
{
|
|
||||||
mNegativeCache.add(hash);
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
|
||||||
|
|
||||||
Serializer s(sData);
|
Serializer s(sData);
|
||||||
|
|
||||||
@@ -139,7 +132,6 @@ bool HashedObjectStore::store(HashedObjectType type, uint32 index,
|
|||||||
}
|
}
|
||||||
// else
|
// else
|
||||||
// cLog(lsTRACE) << "HOS: already had " << hash;
|
// cLog(lsTRACE) << "HOS: already had " << hash;
|
||||||
mNegativeCache.del(hash);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user