| 960 | } |
| 961 | |
| 962 | void 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 | |
| 977 | void LegacyScriptPubKeyMan::AddInactiveHDChain(const CHDChain& chain) |
| 978 | { |
nothing calls this directly
no test coverage detected