Skip to content

Commit

Permalink
[RPC] getwalletinfo: Add last_processed_block return value.
Browse files Browse the repository at this point in the history
  • Loading branch information
furszy committed Apr 1, 2021
1 parent e2085e5 commit dc2d22a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3721,12 +3721,13 @@ UniValue getwalletinfo(const JSONRPCRequest& request)
" \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet in PIV\n"
" \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n"
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n"
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated (only counts external keys)\n"
" \"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"
" \"keypoolsize_hd_staking\": xxxx, (numeric) how many new keys are pre-generated for staking use (used for staking contracts, only appears if the wallet is using this feature)\n"
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated (only counts external keys)\n"
" \"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"
" \"keypoolsize_hd_staking\": xxxx, (numeric) how many new keys are pre-generated for staking use (used for staking contracts, only appears if the wallet is using this feature)\n"
" \"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"
" \"paytxfee\": x.xxxx (numeric) the transaction fee configuration, set in PIV/kB\n"
" \"hdseedid\": \"<hash160>\" (string, optional) the Hash160 of the HD seed (only present when HD is enabled)\n"
" \"hdseedid\": \"<hash160>\" (string, optional) the Hash160 of the HD seed (only present when HD is enabled)\n"
" \"last_processed_block\": xxxxx, (numeric) the last block processed block height\n"
"}\n"

"\nExamples:\n" +
Expand Down Expand Up @@ -3768,6 +3769,7 @@ UniValue getwalletinfo(const JSONRPCRequest& request)
if (pwalletMain->IsCrypted())
obj.pushKV("unlocked_until", nWalletUnlockTime);
obj.pushKV("paytxfee", ValueFromAmount(payTxFee.GetFeePerK()));
obj.pushKV("last_processed_block", pwalletMain->GetLastBlockHeight());
return obj;
}

Expand Down

0 comments on commit dc2d22a

Please sign in to comment.