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

Method AddHDChain

src/wallet/scriptpubkeyman.cpp:962–975  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

960}
961
962void LegacyScriptPubKeyMan::AddHDChain(const CHDChain& chain)
963{
964 LOCK(cs_KeyStore);
965 // Store the new chain
966 if (!WalletBatch(m_storage.GetDatabase()).WriteHDChain(chain)) {
967 throw std::runtime_error(std::string(__func__) + ": writing chain failed");
968 }
969 // When there's an old chain, add it as an inactive chain as we are now rotating hd chains
970 if (!m_hd_chain.seed_id.IsNull()) {
971 AddInactiveHDChain(m_hd_chain);
972 }
973
974 m_hd_chain = chain;
975}
976
977void LegacyScriptPubKeyMan::AddInactiveHDChain(const CHDChain& chain)
978{

Callers

nothing calls this directly

Calls 3

WalletBatchClass · 0.85
WriteHDChainMethod · 0.80
IsNullMethod · 0.45

Tested by

no test coverage detected