Skip to content

Is the pattern for the byte type correct? #634

@fvictorio

Description

@fvictorio

This is the pattern for the byte type:

^0x([0-9a-fA-F]?){1,2}$

Unless I'm missing something, this is equivalent to:

^0x([0-9a-fA-F]){0,2}$

(I removed the ? and changed the repetition range from {1,2} to {0,2})

Meaning that it accepts 0x as a valid value.

Maybe that's intentional, but the weird combination of ? and {1,2} makes me think it might be a mistake. I also tried this with geth some weeks ago, and I think it didn't accept 0x as a valid value for the yParity of authorization items, although I haven't double-checked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions