Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/db.cpp
Show First 20 Lines • Show All 310 Lines • ▼ Show 20 Lines | if (ret > 0) { | ||||
return false; | return false; | ||||
} | } | ||||
DbTxn *ptxn = env->TxnBegin(); | DbTxn *ptxn = env->TxnBegin(); | ||||
for (CDBEnv::KeyValPair &row : salvagedData) { | for (CDBEnv::KeyValPair &row : salvagedData) { | ||||
if (recoverKVcallback) { | if (recoverKVcallback) { | ||||
CDataStream ssKey(row.first, SER_DISK, CLIENT_VERSION); | CDataStream ssKey(row.first, SER_DISK, CLIENT_VERSION); | ||||
CDataStream ssValue(row.second, SER_DISK, CLIENT_VERSION); | CDataStream ssValue(row.second, SER_DISK, CLIENT_VERSION); | ||||
std::string strType, strErr; | |||||
if (!(*recoverKVcallback)(callbackDataIn, ssKey, ssValue)) { | if (!(*recoverKVcallback)(callbackDataIn, ssKey, ssValue)) { | ||||
continue; | continue; | ||||
} | } | ||||
} | } | ||||
Dbt datKey(&row.first[0], row.first.size()); | Dbt datKey(&row.first[0], row.first.size()); | ||||
Dbt datValue(&row.second[0], row.second.size()); | Dbt datValue(&row.second[0], row.second.size()); | ||||
int ret2 = pdbCopy->put(ptxn, &datKey, &datValue, DB_NOOVERWRITE); | int ret2 = pdbCopy->put(ptxn, &datKey, &datValue, DB_NOOVERWRITE); | ||||
if (ret2 > 0) { | if (ret2 > 0) { | ||||
▲ Show 20 Lines • Show All 531 Lines • Show Last 20 Lines |