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
In general Hash is way to overloaded in the codebase, CandidateHash was a glorious exception, being a newtype around Hash, but due to thisDeRef instance, it is still interchangeable, limiting the added type safety.
We should:
Remove the CandidateHashDeRef instance.
Introduce more proper newtype wrappers. E.g. for the head data hash of a parachain, also relay block hashes should not be plain Hash ... although that change will be massive and probably overkill if we at least use newtypes for all other hashes.
The text was updated successfully, but these errors were encountered:
We can use macro to wrapper newtype around a [Hash] type. Not only for CandidateHash, but also all defined hashtype. I'd like to work on this issue, but maybe that's a breaking change.
In general
Hash
is way to overloaded in the codebase,CandidateHash
was a glorious exception, being anewtype
aroundHash
, but due to thisDeRef
instance, it is still interchangeable, limiting the added type safety.We should:
CandidateHash
DeRef
instance.Hash
... although that change will be massive and probably overkill if we at least use newtypes for all other hashes.The text was updated successfully, but these errors were encountered: