Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Change From trait conversion for Hash with TryFrom to remove all unwrap/expect #37

Open
musitdev opened this issue Jan 14, 2024 · 0 comments

Comments

@musitdev
Copy link
Contributor

The From impl in the Hash struct use expect and unwrap to hide conversion error.
Hash data are part of the data send and receive from the node. Using unwrap in these function can be an attack vector to crash the node.
All conversion function that can fail should implement the TryFrom trait instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant