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
Create a macro which will be able to create a new Digest value from a long hex string in a constant environment (inside a constant function/creation of a constant value).
Something like:
I had created this previously for pathfinder with two macros for const evaluation of hex string and from bytes.
The macros are here, and the const hex parsing here.
We did try existing crates for the hex parsing but they all expect exact lengths which kind of sucks for creating quick test values i.e. they reject 0x123.
Its also not possible to do this without the quotes unfortunately, as numeric input must fit into a numeric type so you'd be restricted to u128 length. Which might be fine for tests I guess.
Feature description
Create a macro which will be able to create a new
Digest
value from a long hex string in a constant environment (inside a constant function/creation of a constant value).Something like:
Why is this feature needed?
This macro will be used during the creation of the constant array of the kernel procedure hashes, making the code more concise.
The text was updated successfully, but these errors were encountered: