Skip to content
Unverified Commit 5e8348f0 authored by Tobi Demeco's avatar Tobi Demeco Committed by GitHub
Browse files

sp-trie: correctly avoid panicking when decoding bad compact proofs (#6502)

# Description

Opening another PR because I added a test to check for my fix pushed in
#6486 and realized that for some reason I completely forgot how to code
and did not fix the underlying issue, since out-of-bounds indexing could
still happen even with the check I added. This one should fix that and,
as an added bonus, has a simple test used as an integrity check to make
sure future changes don't accidently revert this fix.

Now `sp-trie` should definitely not panic when faced with bad
`CompactProof`s. Sorry about that 😅



This, like #6486, is related to issue #6485

## Integration

No changes have to be done downstream, and as such the version bump
should be minor.

---------

Co-authored-by: default avatarBastian Köcher <[email protected]>
parent 5721e556
Pipeline #506135 waiting for manual action with stages
in 16 minutes and 3 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment