Please add the labels corresponding to the type of changes your PR introduces:
[ ] Feature
[x] Bugfix
[ ] Refactor
[ ] Format
[ ] Documentation
[ ] Testing
[ ] Other:
Description
Removes H256::from_slice which panics if a provided slice is not 32 bytes.
It appends leading zeros up to 32 bytes if the rlp value (message hash) has leading zeros that are trimmed.
Prevents code from panicking and gets the correct hash (32 bytes) from the storage proof/account.
Related Issues
Testing Performed
Checklist
[x] I have performed a self-review of my own code.
[x] The tests pass successfully with cargo test.
[x] The code was formatted with cargo fmt.
[ ] The code compiles with no new warnings with cargo build --release and cargo build --release --features runtime-benchmarks.
[ ] The code has no new warnings when using cargo clippy.
[ ] If this change affects documented features or needs new documentation, I have created a PR with a documentation update.
Pull Request type
Please add the labels corresponding to the type of changes your PR introduces:
Description
Removes
H256::from_slice
which panics if a provided slice is not 32 bytes. It appends leading zeros up to 32 bytes if the rlp value (message hash) has leading zeros that are trimmed.Prevents code from panicking and gets the correct hash (32 bytes) from the storage proof/account.
Related Issues
Testing Performed
Checklist
cargo test
.cargo fmt
.cargo build --release
andcargo build --release --features runtime-benchmarks
.cargo clippy
.