private List<Transaction> orderTransactions(List<Transaction> transactions, List<OrderingConstraint> constraints) {
        if (transactions.size() == 1) return transactions;

        List<Transaction> orderedTransactions = new ArrayList<>();
        for (Transaction transaction : transactions)
            orderedTransactions.add(findSuitablePositionFor(transaction, orderedTransactions, constraints), transaction);
        return orderedTransactions;
    }
Orders combined transactions consistent with the ordering constraints
vespajlib/src/main/java/com/yahoo/transaction/NestedTransaction.java