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.
{
    CDBBatch batch(*m_db);
    std::unique_ptr<CDBIterator> db_it(m_db->NewIterator());
    
    
    
    if (!CopyHeightIndexToHashIndex(*db_it, batch, m_name, new_tip.height, current_tip.height)) {
        return false;
    }
    if (!m_db->WriteBatch(batch)) return false;
    {
        LOCK(cs_main);
        const CBlockIndex* iter_tip{m_chainstate->m_blockman.LookupBlockIndex(current_tip.hash)};
        const CBlockIndex* new_tip_index{m_chainstate->m_blockman.LookupBlockIndex(new_tip.hash)};
        const auto& consensus_params{Params().GetConsensus()};
        do {
            CBlock block;
            if (!ReadBlockFromDisk(block, iter_tip, consensus_params)) {
                return error("%s: Failed to read block %s from disk",
                             __func__, iter_tip->GetBlockHash().ToString());
            }
            ReverseBlock(block, iter_tip);
            iter_tip = iter_tip->GetAncestor(iter_tip->nHeight - 1);
        } while (new_tip_index != iter_tip);
    }
    return true;
}
static bool LookUpOne(const CDBWrapper& db, const interfaces::BlockKey& block, DBVal& result)