class BridgeSerializationUtils {

    public static byte[] serializeReleaseRequestQueue(ReleaseRequestQueue queue) {
        List<ReleaseRequestQueue.Entry> entries = queue.getEntriesWithoutHash();

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

        for (ReleaseRequestQueue.Entry entry : entries) {
            bytes[n++] = RLP.encodeElement(entry.getDestination().getHash160());
            bytes[n++] = RLP.encodeBigInteger(BigInteger.valueOf(entry.getAmount().getValue()));
        }

        return RLP.encodeList(bytes);
    }

    private  BridgeSerializationUtils();

}