Skip to content

Commit

Permalink
Explain TODO comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashatyrev committed Apr 26, 2024
1 parent d994eeb commit 8b8b79c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ default SszCollectionT createFromElements(final List<? extends SszElementT> elem
}

default TreeNode createTreeFromElements(final List<? extends SszElementT> elements) {
// TODO: suboptimal
// TODO: probably suboptimal method implementation:
// This is a generic implementation which works for both Vector and List but it potentially
// could do better if construct the tree directly in List/Vector subclasses
checkArgument(elements.size() <= getMaxLength(), "Too many elements for this collection type");
SszMutableComposite<SszElementT> writableCopy = getDefault().createWritableCopy();
int idx = 0;
Expand Down

0 comments on commit 8b8b79c

Please sign in to comment.