aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <[email protected]>2017-01-16 08:56:37 +0100
committerJonas Schnelli <[email protected]>2017-03-24 10:28:37 +0100
commitd59531ddfc09f705c2ef3a33c41d6d910756da18 (patch)
tree7b7f98783301e1b895b7d678997022575a3b9c8f /src/wallet/wallet.cpp
parent[Wallet] split the keypool in an internal and external part (diff)
downloaddiscoin-d59531ddfc09f705c2ef3a33c41d6d910756da18.tar.xz
discoin-d59531ddfc09f705c2ef3a33c41d6d910756da18.zip
Immediately return setKeyPool's size if HD or HD_SPLIT is disabled or not supported
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 71c97a4e8..349dff4f2 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -2912,6 +2912,10 @@ size_t CWallet::KeypoolCountExternalKeys()
{
AssertLockHeld(cs_wallet); // setKeyPool
+ // immediately return setKeyPool's size if HD or HD_SPLIT is disabled or not supported
+ if (!IsHDEnabled() || !CanSupportFeature(FEATURE_HD_SPLIT))
+ return setKeyPool.size();
+
CWalletDB walletdb(strWalletFile);
// count amount of external keys