schroedingerscode commented on a change in pull request #19: SSZ v0.5.0 Related 
Changes
URL: https://github.com/apache/incubator-tuweni/pull/19#discussion_r295841878
 
 

 ##########
 File path: ssz/src/main/java/org/apache/tuweni/ssz/SSZReader.java
 ##########
 @@ -330,6 +369,82 @@ default boolean readBoolean() {
     return readBytesList(Integer.MAX_VALUE);
   }
 
+  /**
+   * Read a known-size fixed-length list of {@link Bytes} from the SSZ source. 
The list WILL NOT have a length mixin,
+   * where as the elements WILL.
+   *
+   * Note: prefer to use {@link #readBytesList(long, int)} instead, especially 
when reading untrusted data.
+   *
+   * @param listSize The size of the fixed-length list being read.
+   * @return A list of {@link Bytes}.
+   * @throws InvalidSSZTypeException If the next SSZ value is not a list, any 
value in the list is not a byte array, or
+   *         any byte array is too large (greater than 2^32 bytes).
+   * @throws EndOfSSZException If there are no more SSZ values to read.
+   */
+  default List<Bytes> readBytesList(long listSize) {
 
 Review comment:
   The listSize being a long was a hack to avoid that. There's definitely a 
better way...but naming things is hard.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to