Skip to content

Commit e138876

Browse files
committed
Only show keypoolsize_hd_internal if HD split is enabled
1 parent add38d9 commit e138876

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2425,7 +2425,7 @@ UniValue getwalletinfo(const JSONRPCRequest& request)
24252425
" \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n"
24262426
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool\n"
24272427
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated (only counts external keys)\n"
2428-
" \"keypoolsize_hd_internal\": xxxx, (numeric) how many new keys are pre-generated for internal use (used for change outputs, only appears if HD is enabled otherwise there is no need for internal keys)\n"
2428+
" \"keypoolsize_hd_internal\": xxxx, (numeric) how many new keys are pre-generated for internal use (used for change outputs, only appears if the wallet is using this feature, otherwise external keys are used)\n"
24292429
" \"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n"
24302430
" \"paytxfee\": x.xxxx, (numeric) the transaction fee configuration, set in " + CURRENCY_UNIT + "/kB\n"
24312431
" \"hdmasterkeyid\": \"<hash160>\" (string) the Hash160 of the HD master pubkey\n"
@@ -2447,7 +2447,7 @@ UniValue getwalletinfo(const JSONRPCRequest& request)
24472447
obj.push_back(Pair("keypoololdest", pwallet->GetOldestKeyPoolTime()));
24482448
obj.push_back(Pair("keypoolsize", (int64_t)kpExternalSize));
24492449
CKeyID masterKeyID = pwallet->GetHDChain().masterKeyID;
2450-
if (!masterKeyID.IsNull()) {
2450+
if (!masterKeyID.IsNull() && pwallet->CanSupportFeature(FEATURE_HD_SPLIT)) {
24512451
obj.push_back(Pair("keypoolsize_hd_internal", (int64_t)(pwallet->GetKeyPoolSize() - kpExternalSize)));
24522452
}
24532453
if (pwallet->IsCrypted()) {

0 commit comments

Comments
 (0)