| 3952 | } |
| 3953 | |
| 3954 | void CWallet::MarkPreSplitKeys() |
| 3955 | { |
| 3956 | WalletBatch batch(*database); |
| 3957 | for (auto it = setExternalKeyPool.begin(); it != setExternalKeyPool.end();) { |
| 3958 | int64_t index = *it; |
| 3959 | CKeyPool keypool; |
| 3960 | if (!batch.ReadPool(index, keypool)) { |
| 3961 | throw std::runtime_error(std::string(__func__) + ": read keypool entry failed"); |
| 3962 | } |
| 3963 | keypool.m_pre_split = true; |
| 3964 | if (!batch.WritePool(index, keypool)) { |
| 3965 | throw std::runtime_error(std::string(__func__) + ": writing modified keypool entry failed"); |
| 3966 | } |
| 3967 | set_pre_split_keypool.insert(index); |
| 3968 | it = setExternalKeyPool.erase(it); |
| 3969 | } |
| 3970 | } |
| 3971 | |
| 3972 | bool CWallet::Verify(std::string wallet_file, bool salvage_wallet, std::string& error_string, std::string& warning_string) |
| 3973 | { |