Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fractasy hashdb 64 #540

Merged
merged 9 commits into from
Sep 7, 2023
8 changes: 4 additions & 4 deletions src/hashdb/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ zkresult Database::write(const string &_key, const Goldilocks::Element* vkey, co
if(usingAssociativeCache()){
Goldilocks::Element vkeyf[4];
if(vkey == NULL){
string2key(fr, key, vkeyf);
string2fea(fr, key, vkeyf);
}else{
vkeyf[0] = vkey[0];
vkeyf[1] = vkey[1];
Expand Down Expand Up @@ -699,7 +699,7 @@ zkresult Database::readTreeRemote(const string &key, bool *keys, uint64_t level,
//zklog.info("Database::readTreeRemote() adding hash=" + hash + " to dbMTCache");
if(usingAssociativeCache()){
Goldilocks::Element vhash[4];
string2key(fr, hash, vhash);
string2fea(fr, hash, vhash);
dbMTACache.addKeyValue(vhash, value, false);
}else{
dbMTCache.add(hash, value, false);
Expand Down Expand Up @@ -1649,7 +1649,7 @@ void Database::printTree(const string &root, string prefix)
string key = root;
vector<Goldilocks::Element> value;
Goldilocks::Element vKey[4];
if(Database::useAssociativeCache) string2key(fr, key, vKey);
if(Database::useAssociativeCache) string2fea(fr, key, vKey);
read(key,vKey,value, NULL);

if (value.size() != 12)
Expand Down Expand Up @@ -2040,7 +2040,7 @@ void loadDb2MemCache(const Config &config)
dbValue.clear();
Goldilocks::Element vhash[4];
string hashNorm = NormalizeToNFormat(hash, 64);
if(pHashDB->db.usingAssociativeCache()) string2key(fr, hashNorm, vhash);
if(pHashDB->db.usingAssociativeCache()) string2fea(fr, hashNorm, vhash);
zkresult zkr = pHashDB->db.read(hash, vhash, dbValue, NULL, true);

if (zkr != ZKR_SUCCESS)
Expand Down
2 changes: 1 addition & 1 deletion src/hashdb64/database_64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2977,7 +2977,7 @@ void loadDb2MemCache64 (const Config &config)
hash = treeMapIterator->second[i];
dbValue.clear();
Goldilocks::Element vhash[4];
if(pHashDB->db.usingAssociativeCache()) string2key(fr, hash, vhash);
if(pHashDB->db.usingAssociativeCache()) string2fea(fr, hash, vhash);
zkresult zkr = pHashDB->db.read(hash, vhash, dbValue, NULL, true);

if (zkr != ZKR_SUCCESS)
Expand Down
Loading
Loading