diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2017-01-16 08:56:37 +0100 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2017-03-24 10:28:37 +0100 |
commit | d59531ddfc09f705c2ef3a33c41d6d910756da18 (patch) | |
tree | 7b7f98783301e1b895b7d678997022575a3b9c8f /src | |
parent | 02592f4c5e6d9416165deef96398ac7760f457d1 (diff) |
Immediately return setKeyPool's size if HD or HD_SPLIT is disabled or not supported
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 71c97a4e87..349dff4f2e 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 |