https://travis-ci.org/github/bitcoin/bitcoin/jobs/680452476#L6107
#include <util/string.h>
#include <validation.h>
#include <validationinterface.h>
#include <numeric>
#include <stdint.h>
#include <univalue.h>
static void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry)
{
    
    
    
    
    
    TxToUniv(tx, uint256(), entry, true, RPCSerializationFlags());
    if (!hashBlock.IsNull()) {
        LOCK(cs_main);
        entry.pushKV("blockhash", hashBlock.GetHex());
        CBlockIndex* pindex = LookupBlockIndex(hashBlock);
        if (pindex) {
            if (::ChainActive().Contains(pindex)) {
                entry.pushKV("confirmations", 1 + ::ChainActive().Height() - pindex->nHeight);
                entry.pushKV("time", pindex->GetBlockTime());
                entry.pushKV("blocktime", pindex->GetBlockTime());
            }
            else
                entry.pushKV("confirmations", 0);
        }
    }
}
static RPCHelpMan getrawtransaction()