Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/walletdb.h
Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | public: | ||||
// 0 means unknown. | // 0 means unknown. | ||||
int64_t nCreateTime; | int64_t nCreateTime; | ||||
// optional HD/bip32 keypath. | // optional HD/bip32 keypath. | ||||
std::string hdKeypath; | std::string hdKeypath; | ||||
// Id of the HD masterkey used to derive this key. | // Id of the HD masterkey used to derive this key. | ||||
CKeyID hdMasterKeyID; | CKeyID hdMasterKeyID; | ||||
CKeyMetadata() { SetNull(); } | CKeyMetadata() { SetNull(); } | ||||
CKeyMetadata(int64_t nCreateTime_) { | explicit CKeyMetadata(int64_t nCreateTime_) { | ||||
SetNull(); | SetNull(); | ||||
nCreateTime = nCreateTime_; | nCreateTime = nCreateTime_; | ||||
} | } | ||||
ADD_SERIALIZE_METHODS; | ADD_SERIALIZE_METHODS; | ||||
template <typename Stream, typename Operation> | template <typename Stream, typename Operation> | ||||
inline void SerializationOp(Stream &s, Operation ser_action) { | inline void SerializationOp(Stream &s, Operation ser_action) { | ||||
Show All 35 Lines | template <typename K> bool EraseIC(const K &key) { | ||||
if (!batch.Erase(key)) { | if (!batch.Erase(key)) { | ||||
return false; | return false; | ||||
} | } | ||||
m_dbw.IncrementUpdateCounter(); | m_dbw.IncrementUpdateCounter(); | ||||
return true; | return true; | ||||
} | } | ||||
public: | public: | ||||
CWalletDB(CWalletDBWrapper &dbw, const char *pszMode = "r+", | explicit CWalletDB(CWalletDBWrapper &dbw, const char *pszMode = "r+", | ||||
bool _fFlushOnClose = true) | bool _fFlushOnClose = true) | ||||
: batch(dbw, pszMode, _fFlushOnClose), m_dbw(dbw) {} | : batch(dbw, pszMode, _fFlushOnClose), m_dbw(dbw) {} | ||||
bool WriteName(const CTxDestination &address, const std::string &strName); | bool WriteName(const CTxDestination &address, const std::string &strName); | ||||
bool EraseName(const CTxDestination &address); | bool EraseName(const CTxDestination &address); | ||||
bool WritePurpose(const CTxDestination &address, | bool WritePurpose(const CTxDestination &address, | ||||
const std::string &purpose); | const std::string &purpose); | ||||
bool ErasePurpose(const CTxDestination &address); | bool ErasePurpose(const CTxDestination &address); | ||||
▲ Show 20 Lines • Show All 106 Lines • Show Last 20 Lines |