After https://github.com/bitcoin/bitcoin/pull/27037 miniscript is extracted from compatible scripts, unless the `FillableSigningProvider::AddCScript` check for `MAX_SCRIPT_ELEMENT_SIZE` fails, which then it falls back to legacy behavior.

@achow101 
}
    
    if (request.params[2].isNull()) {
        LOCK(cs_main);
        blockindex = chainman.m_blockman.LookupBlockIndex(hash_block);
    }
    if (verbosity == 1) {
        TxToJSON(*tx, hash_block, result, chainman.ActiveChainstate());
        return result;
    }
    CBlockUndo blockUndo;
    CBlock block;
    const bool is_block_pruned{WITH_LOCK(cs_main, return chainman.m_blockman.IsBlockPruned(blockindex))};
    if (tx->IsCoinBase() ||
        !blockindex || is_block_pruned ||
        !(UndoReadFromDisk(blockUndo, blockindex) && ReadBlockFromDisk(block, blockindex, Params().GetConsensus()))) {
        TxToJSON(*tx, hash_block, result, chainman.ActiveChainstate());
        return result;
    }
    CTxUndo* undoTX {nullptr};
    auto it = std::find_if(block.vtx.begin(), block.vtx.end(), [tx](CTransactionRef t){ return *t == *tx; });
    if (it != block.vtx.end()) {
        
        undoTX = &blockUndo.vtxundo.at(it - block.vtx.begin() - 1);
    }
    TxToJSON(*tx, hash_block, result, chainman.ActiveChainstate(), undoTX, TxVerbosity::SHOW_DETAILS_AND_PREVOUT);
    return result;
},
    };
}