celestiaorg / nmt

Namespaced Merkle Tree
Apache License 2.0
113 stars 39 forks source link

validateSiblingsNamespaceOrder can panic upon invalid inputs #138

Closed staheri14 closed 1 year ago

staheri14 commented 1 year ago

Problem

The validateSiblingsNamespaceOrder can panic upon invalid inputs, non-namespaced nodes. While this is used internally, if not used carefully, it may result in panic.

Acceptance Criteria

Validate the nodes format at the begining of the function and return error for invalid nodes.