diff options
| author | Russell Yanofsky <[email protected]> | 2019-11-05 10:53:07 -0500 |
|---|---|---|
| committer | Russell Yanofsky <[email protected]> | 2019-11-05 10:53:07 -0500 |
| commit | 05b224a175065aee4d6d9c471722bc4503f01fdf (patch) | |
| tree | f852acbdc981e2c1f63cebbd75ec0528003eb822 /src | |
| parent | Clean up nested scope in GetReservedDestination (diff) | |
| download | discoin-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')
| -rw-r--r-- | src/wallet/wallet.cpp | 4 |
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(); |