| 1214 | } |
| 1215 | |
| 1216 | void LegacyScriptPubKeyMan::SetHDSeed(const CPubKey& seed) |
| 1217 | { |
| 1218 | LOCK(cs_KeyStore); |
| 1219 | // store the keyid (hash160) together with |
| 1220 | // the child index counter in the database |
| 1221 | // as a hdchain object |
| 1222 | CHDChain newHdChain; |
| 1223 | newHdChain.nVersion = m_storage.CanSupportFeature(FEATURE_HD_SPLIT) ? CHDChain::VERSION_HD_CHAIN_SPLIT : CHDChain::VERSION_HD_BASE; |
| 1224 | newHdChain.seed_id = seed.GetID(); |
| 1225 | AddHDChain(newHdChain); |
| 1226 | NotifyCanGetAddressesChanged(); |
| 1227 | WalletBatch batch(m_storage.GetDatabase()); |
| 1228 | m_storage.UnsetBlankWalletFlag(batch); |
| 1229 | } |
| 1230 | |
| 1231 | /** |
| 1232 | * Mark old keypool keys as used, |
no test coverage detected