Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 3,412 Lines • ▼ Show 20 Lines | if (nLoadWalletRet == DBErrors::NEED_REWRITE) { | ||||
setExternalKeyPool.clear(); | setExternalKeyPool.clear(); | ||||
m_pool_key_to_index.clear(); | m_pool_key_to_index.clear(); | ||||
// Note: can't top-up keypool here, because wallet is locked. | // Note: can't top-up keypool here, because wallet is locked. | ||||
// User will be prompted to unlock wallet the next operation | // User will be prompted to unlock wallet the next operation | ||||
// that requires a new key. | // that requires a new key. | ||||
} | } | ||||
} | } | ||||
{ | |||||
LOCK(cs_KeyStore); | |||||
// This wallet is in its first run if all of these are empty | // This wallet is in its first run if all of these are empty | ||||
fFirstRunRet = mapKeys.empty() && mapCryptedKeys.empty() && | fFirstRunRet = mapKeys.empty() && mapCryptedKeys.empty() && | ||||
mapWatchKeys.empty() && setWatchOnly.empty() && | mapWatchKeys.empty() && setWatchOnly.empty() && | ||||
mapScripts.empty(); | mapScripts.empty(); | ||||
} | |||||
if (nLoadWalletRet != DBErrors::LOAD_OK) { | if (nLoadWalletRet != DBErrors::LOAD_OK) { | ||||
return nLoadWalletRet; | return nLoadWalletRet; | ||||
} | } | ||||
return DBErrors::LOAD_OK; | return DBErrors::LOAD_OK; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,434 Lines • Show Last 20 Lines |