class BridgeSerializationUtils {

    public static byte[] serializeReleaseTransactionSet(ReleaseTransactionSet set) {
        List<ReleaseTransactionSet.Entry> entries = set.getEntriesWithoutHash().stream().collect(Collectors.toList());
        entries.sort(ReleaseTransactionSet.Entry.BTC_TX_COMPARATOR);

        byte[][] bytes = new byte[entries.size() * 2][];
        int n = 0;

        for (ReleaseTransactionSet.Entry entry : entries) {
            bytes[n++] = RLP.encodeElement(entry.getTransaction().bitcoinSerialize());
            bytes[n++] = RLP.encodeBigInteger(BigInteger.valueOf(entry.getRskBlockNumber()));
        }

        return RLP.encodeList(bytes);
    }

    private  BridgeSerializationUtils();

}