MCPcopy Create free account
hub / github.com/ElementsProject/elements / SetHDSeed

Method SetHDSeed

src/wallet/scriptpubkeyman.cpp:1216–1229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1214}
1215
1216void 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,

Callers 1

sethdseedFunction · 0.80

Calls 3

UnsetBlankWalletFlagMethod · 0.80
GetIDMethod · 0.45

Tested by

no test coverage detected