Verify that the list of transaction outputs are acceptable

def check_tx_output_types(outputs, block_height):
    """
    Verify that the list of transaction outputs are acceptable
    """
    # for now, we do not allow nonstandard outputs (all outputs must be p2pkh or p2sh outputs)
    # this excludes bech32 outputs, for example.
    supported_output_types = get_epoch_btc_script_types(block_height)
    for out in outputs:
        out_type = virtualchain.btc_script_classify(out['script'])
        if out_type not in supported_output_types:
            log.warning('Unsupported output type {} ({})'.format(out_type, out['script']))
            return False

    return True