Remove bytes validator and call syntactic validator during map decode. Only check min/max length when validation is on.
Also reorder some errors, so we get more readable error messages:
Before:
transaction is invalid: metadata exceeds max allowed size: the StateMetadataFeature of the output at index 0 has size 8193; max allowed: 8192: syntactic validator returns an error for type iotago.SignedTransaction: pre-serialization validation failed
After:
pre-serialization validation failed: syntactic validator returned an error for type iotago.SignedTransaction: transaction is invalid: metadata exceeds max allowed size: the StateMetadataFeature of the output at index 0 has size 8193; max allowed: 8192
Type of change
Choose a type of change, and delete any options that are not relevant.
Bug fix (a non-breaking change which fixes an issue)
Description of change
Remove bytes validator and call syntactic validator during map decode. Only check min/max length when validation is on.
Also reorder some errors, so we get more readable error messages:
Before:
After:
Type of change
Choose a type of change, and delete any options that are not relevant.
How the change has been tested
Tested via iota.go.