the command "bitcoin-cli getblockstats 0000000000000000000c61ff8f761ce509fc8901d3c22d61fec89637042ea2ba" does not work.

It displays "error: Error parsing JSON:0000000000000000000c61ff8f761ce509fc8901d3c22d61fec89637042ea2ba"

but it should display the block stats like the documentation says.

also bitcoin-cli getblockstats 0 does not work. block number must be at least 1 to work. But blocks start at 0.

tested with 0.20.1 on freebsd, another user on IRC acknowledged the problem.
}
    }
    if (block) {
        DBVal entry;
        if (!LookUpOne(*m_db, *block, entry)) {
            return error("%s: Cannot read current %s state; index may be corrupted",
                         __func__, GetName());
        }
        uint256 out;
        m_muhash.Finalize(out);
        if (entry.muhash != out) {
            return error("%s: Cannot read current %s state; index may be corrupted",
                         __func__, GetName());
        }
        m_transaction_output_count = entry.transaction_output_count;
        m_bogo_size = entry.bogo_size;
        m_total_amount = entry.total_amount;
        m_total_subsidy = entry.total_subsidy;
        m_total_unspendable_amount = entry.total_unspendable_amount;
        m_total_prevout_spent_amount = entry.total_prevout_spent_amount;
        m_total_new_outputs_ex_coinbase_amount = entry.total_new_outputs_ex_coinbase_amount;
        m_total_coinbase_amount = entry.total_coinbase_amount;
        m_total_unspendables_genesis_block = entry.total_unspendables_genesis_block;
        m_total_unspendables_bip30 = entry.total_unspendables_bip30;
        m_total_unspendables_scripts = entry.total_unspendables_scripts;
        m_total_unspendables_unclaimed_rewards = entry.total_unspendables_unclaimed_rewards;
    }
    return true;
}
bool CoinStatsIndex::CustomCommit(CDBBatch& batch)