aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2019-11-05 10:53:07 -0500
committerRussell Yanofsky <russ@yanofsky.org>2019-11-05 10:53:07 -0500
commit05b224a175065aee4d6d9c471722bc4503f01fdf (patch)
treef852acbdc981e2c1f63cebbd75ec0528003eb822 /src/wallet
parentbfd826a675445801adec86a469040f3ceb8172ee (diff)
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 0b7dc256ad..cdcb65e3c0 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();