Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/walletdb.h
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | enum class DBErrors { | ||||
NEED_REWRITE | NEED_REWRITE | ||||
}; | }; | ||||
/* simple HD chain data model */ | /* simple HD chain data model */ | ||||
class CHDChain { | class CHDChain { | ||||
public: | public: | ||||
uint32_t nExternalChainCounter; | uint32_t nExternalChainCounter; | ||||
uint32_t nInternalChainCounter; | uint32_t nInternalChainCounter; | ||||
//!< master key hash160 | //!< seed hash160 | ||||
CKeyID seed_id; | CKeyID seed_id; | ||||
static const int VERSION_HD_BASE = 1; | static const int VERSION_HD_BASE = 1; | ||||
static const int VERSION_HD_CHAIN_SPLIT = 2; | static const int VERSION_HD_CHAIN_SPLIT = 2; | ||||
static const int CURRENT_VERSION = VERSION_HD_CHAIN_SPLIT; | static const int CURRENT_VERSION = VERSION_HD_CHAIN_SPLIT; | ||||
int nVersion; | int nVersion; | ||||
CHDChain() { SetNull(); } | CHDChain() { SetNull(); } | ||||
Show All 21 Lines | public: | ||||
static const int VERSION_BASIC = 1; | static const int VERSION_BASIC = 1; | ||||
static const int VERSION_WITH_HDDATA = 10; | static const int VERSION_WITH_HDDATA = 10; | ||||
static const int CURRENT_VERSION = VERSION_WITH_HDDATA; | static const int CURRENT_VERSION = VERSION_WITH_HDDATA; | ||||
int nVersion; | int nVersion; | ||||
// 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 seed used to derive this key. | ||||
CKeyID hd_seed_id; | CKeyID hd_seed_id; | ||||
CKeyMetadata() { SetNull(); } | CKeyMetadata() { SetNull(); } | ||||
explicit CKeyMetadata(int64_t nCreateTime_) { | explicit CKeyMetadata(int64_t nCreateTime_) { | ||||
SetNull(); | SetNull(); | ||||
nCreateTime = nCreateTime_; | nCreateTime = nCreateTime_; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 159 Lines • Show Last 20 Lines |