MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / MarkPreSplitKeys

Method MarkPreSplitKeys

src/wallet/wallet.cpp:3954–3970  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3952}
3953
3954void 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
3972bool CWallet::Verify(std::string wallet_file, bool salvage_wallet, std::string& error_string, std::string& warning_string)
3973{

Callers 1

CreateWalletFromFileMethod · 0.80

Calls 6

ReadPoolMethod · 0.80
WritePoolMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected