When using `listsinceblock` to fetch transactions since the last record observed, there is a relevant detail missed that I would like to record in the ledger: `blockheight`.

It is unreasonable for my wallet interface to do an RPC lookup for every new blockhash just to get the height number. There could be hundreds of transactions or even thousands and they could all be processed with a simple call to `listsinceblock` if it wasn't for the lack of `blockheight`.

Currently it looks like:

> "blockhash": "0000000000000000000549800794b27ab10d5e16ac6ad16a7c4a13dae756f80d",
> "blockindex": 1120,
> "blocktime": 1572073467,

I would like it to look like:

> "blockhash": "0000000000000000000549800794b27ab10d5e16ac6ad16a7c4a13dae756f80d",
> "blockindex": 1120,
> "blocktime": 1572073467,
> "blockheight": 601091,

I have the same request regarding the output of `gettransaction` also.

Thanks in advance.


{
    std::shared_ptr<CWallet> const rpc_wallet = GetWalletForJSONRPCRequest(request);
    if (!EnsureWalletIsAvailable(rpc_wallet.get(), request.fHelp)) {
        return NullUniValue;
    }
    CWallet& wallet = *rpc_wallet;
    RPCHelpMan{
        "getbalances",
        "Returns an object with all balances in " + CURRENCY_UNIT + ".\n",
        {},
        RPCResult{
            "{\n"
            "    \"mine\": {                        (object) balances from outputs that the wallet can sign\n"
            "      \"trusted\": xxx                 (numeric) trusted balance (outputs created by the wallet or confirmed outputs)\n"
            "      \"untrusted_pending\": xxx       (numeric) untrusted pending balance (outputs created by others that are in the mempool)\n"
            "      \"immature\": xxx                (numeric) balance from immature coinbase outputs\n"
            "      \"used\": xxx                    (numeric) (only present if avoid_reuse is set) balance from coins sent to addresses that were previously spent from (potentially privacy violating)\n"
            "    },\n"
            "    \"watchonly\": {                   (object) watchonly balances (not present if wallet does not watch anything)\n"
            "      \"trusted\": xxx                 (numeric) trusted balance (outputs created by the wallet or confirmed outputs)\n"
            "      \"untrusted_pending\": xxx       (numeric) untrusted pending balance (outputs created by others that are in the mempool)\n"
            "      \"immature\": xxx                (numeric) balance from immature coinbase outputs\n"
            "    },\n"
            "}\n"},
        RPCExamples{
            HelpExampleCli("getbalances", "") +
            HelpExampleRpc("getbalances", "")},
    }.Check(request);