Not terribly important but if someone is looking for something to optimize, this is noticaby slow and varrious monitoring might like to call it a lot.

} else if (block->nChainTx == 0) {
            
            status = "headers-only";
        } else if (block->IsValid(BLOCK_VALID_SCRIPTS)) {
            
            status = "valid-fork";
        } else if (block->IsValid(BLOCK_VALID_TREE)) {
            
            status = "valid-headers";
        } else {
            
            status = "unknown";
        }
        obj.push_back(Pair("status", status));
        res.push_back(obj);
    }
    return res;
}
UniValue mempoolInfoToJSON()
{
    UniValue ret(UniValue::VOBJ);
    ret.push_back(Pair("size", (int64_t) mempool.size()));
    ret.push_back(Pair("bytes", (int64_t) mempool.GetTotalTxSize()));
    ret.push_back(Pair("usage", (int64_t) mempool.DynamicMemoryUsage()));
    size_t maxmempool = GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000;
    ret.push_back(Pair("maxmempool", (int64_t) maxmempool));
    ret.push_back(Pair("mempoolminfee", ValueFromAmount(mempool.GetMinFee(maxmempool).GetFeePerK())));
    return ret;
}
UniValue getmempoolinfo(const UniValue& params, bool fHelp)