aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorRussell Yanofsky <[email protected]>2019-11-05 10:53:07 -0500
committerRussell Yanofsky <[email protected]>2019-11-05 10:53:07 -0500
commit05b224a175065aee4d6d9c471722bc4503f01fdf (patch)
treef852acbdc981e2c1f63cebbd75ec0528003eb822 /src/wallet
parentClean up nested scope in GetReservedDestination (diff)
downloaddiscoin-05b224a175065aee4d6d9c471722bc4503f01fdf.tar.xz
discoin-05b224a175065aee4d6d9c471722bc4503f01fdf.zip
Add missing SetupGeneration error handling in EncryptWallet
Suggested https://github.com/bitcoin/bitcoin/pull/17304#discussion_r341286026 by me
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 0b7dc256a..cdcb65e3c 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -572,7 +572,9 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
// if we are using HD, replace the HD seed with a new one
if (auto spk_man = m_spk_man.get()) {
if (spk_man->IsHDEnabled()) {
- spk_man->SetupGeneration(true);
+ if (!spk_man->SetupGeneration(true)) {
+ return false;
+ }
}
}
Lock();