Changeset View
Changeset View
Standalone View
Standalone View
src/dbwrapper.h
Show First 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | template <typename K> bool GetKey(K &key) { | ||||
SER_DISK, CLIENT_VERSION); | SER_DISK, CLIENT_VERSION); | ||||
ssKey >> key; | ssKey >> key; | ||||
} catch (const std::exception &) { | } catch (const std::exception &) { | ||||
return false; | return false; | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
unsigned int GetKeySize() { return piter->key().size(); } | |||||
template <typename V> bool GetValue(V &value) { | template <typename V> bool GetValue(V &value) { | ||||
leveldb::Slice slValue = piter->value(); | leveldb::Slice slValue = piter->value(); | ||||
try { | try { | ||||
CDataStream ssValue(slValue.data(), slValue.data() + slValue.size(), | CDataStream ssValue(slValue.data(), slValue.data() + slValue.size(), | ||||
SER_DISK, CLIENT_VERSION); | SER_DISK, CLIENT_VERSION); | ||||
ssValue.Xor(dbwrapper_private::GetObfuscateKey(parent)); | ssValue.Xor(dbwrapper_private::GetObfuscateKey(parent)); | ||||
ssValue >> value; | ssValue >> value; | ||||
} catch (const std::exception &) { | } catch (const std::exception &) { | ||||
▲ Show 20 Lines • Show All 168 Lines • Show Last 20 Lines |