def blocksFundingTxs(maxTxPerBlock, lstFundingTxs):
    """
    separate the funding transactions into blocks with constants.maxTxPerBlock amount
    :param maxTxPerBlock: maxTxPerBlock
    :param lstFundingTxs: list of funding txs
    :return: list of funding blocks
    """
    lstFundingBlocks = []

    i = 0
    if i + maxTxPerBlock >= len(lstFundingTxs):
        m = len(lstFundingTxs)
    else:
        m = i + maxTxPerBlock
    while i < len(lstFundingTxs):
        lstFundingBlocks += [lstFundingTxs[i:m]]
        i = m
        if i + maxTxPerBlock >= len(lstFundingTxs):
            m = len(lstFundingTxs)
        else:
            m = m + maxTxPerBlock

    return lstFundingBlocks