You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* refactor: simplify identifier length validation
Firstly, remove asserts from the validate_identifier_length and
validate_prefix_length functions. Instead, let the regular checks
handle cases where min and max constraints don’t allow for a valid
prefix to exist.
Secondly, ensure minimum length constraints is at least one. This
makes sure that the validation functions will check for empty
identifiers and prefixes. This makes empty identifier check in
validate_channel_identifier as well as Error::Empty variant
unnecessary so get rid of those too.
Lastly, collapse all checks in validate_prefix_length into a single
call to validate_identifier_length with correctly adjusted min and max
constraints.
Issue: informalsystems#959
* log
* Update 960-simplify-length-validation.md
Signed-off-by: Michal Nazarewicz <[email protected]>
* tests
* Update and rename 960-simplify-length-validation.md to 961-simplify-length-validation.md
Signed-off-by: Michal Nazarewicz <[email protected]>
* update changelog entry
* revert error variant deletion
* refactor id validation tests
* use numeral consistently
---------
Signed-off-by: Michal Nazarewicz <[email protected]>
Co-authored-by: Ranadeep Biswas <[email protected]>
0 commit comments