Closed BrannonKing closed 5 years ago
For review, I want to note the previous copy method:
void CClaimTrieCacheHashFork::copyAllBaseToCache()
{
recurseNodes({}, [this](const std::string& name, const CClaimTrieData& data) {
if (nodesAlreadyCached.insert(name).second)
nodesToAddOrUpdate.insert(name, data);
});
for (auto it = nodesToAddOrUpdate.begin(); it != nodesToAddOrUpdate.end(); ++it) {
it->hash.SetNull();
it->flags |= CClaimTrieDataFlags::HASH_DIRTY;
}
}
removing in favor of memory branch
It wasn't substantially better so I yanked it. It was theoretically better, but it didn't look better by the numbers. It's going to take a substantial number of claims to make the capped leveldb approach better, and before that happens we'll have done the sqlite backing.