Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/scriptpubkeyman.cpp
Show First 20 Lines • Show All 423 Lines • ▼ Show 20 Lines | if (m_storage.CanSupportFeature(FEATURE_HD) && !IsHDEnabled()) { | ||||
m_storage.SetMinVersion(FEATURE_HD); | m_storage.SetMinVersion(FEATURE_HD); | ||||
// generate a new master key | // generate a new master key | ||||
CPubKey masterPubKey = GenerateNewSeed(); | CPubKey masterPubKey = GenerateNewSeed(); | ||||
SetHDSeed(masterPubKey); | SetHDSeed(masterPubKey); | ||||
hd_upgrade = true; | hd_upgrade = true; | ||||
} | } | ||||
// Upgrade to HD chain split if necessary | // Upgrade to HD chain split if necessary | ||||
if (m_storage.CanSupportFeature(FEATURE_HD_SPLIT) && | if (m_storage.CanSupportFeature(FEATURE_HD_SPLIT)) { | ||||
CHDChain::VERSION_HD_CHAIN_SPLIT) { | |||||
WalletLogPrintf("Upgrading wallet to use HD chain split\n"); | WalletLogPrintf("Upgrading wallet to use HD chain split\n"); | ||||
m_storage.SetMinVersion(FEATURE_PRE_SPLIT_KEYPOOL); | m_storage.SetMinVersion(FEATURE_PRE_SPLIT_KEYPOOL); | ||||
split_upgrade = FEATURE_HD_SPLIT > prev_version; | split_upgrade = FEATURE_HD_SPLIT > prev_version; | ||||
} | } | ||||
// Mark all keys currently in the keypool as pre-split | // Mark all keys currently in the keypool as pre-split | ||||
if (split_upgrade) { | if (split_upgrade) { | ||||
MarkPreSplitKeys(); | MarkPreSplitKeys(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,913 Lines • Show Last 20 Lines |