Skip to content
Unverified Commit a61bd407 authored by Sergei Pepyakin's avatar Sergei Pepyakin Committed by GitHub
Browse files

Check storage_key for validity (#2316)



* Intro `ChildStorageKey` for checked child keys

* Get rid of Into in Externalities trait

* Use Cow in ChildStorageKey

* Fix tests for state-machine.

* Clean

* child_storage_root always return a value

* Don't return Option from Ext::child_storage_root

* Return 42 in child_storage_root

* Return CHILD_STORAGE_KEY_PREFIX from trie id gen

* Bump spec and impl version.

* Require `:default:` in `is_child_trie_key_valid`

* Add `default:` prefix.

* Introduce `into_owned` for `ChildStorageKey`.

* Add documentation.

* Fix state-machine tests

* Remove outdated TODO

I check out with Emeric and he is ok with that

* child_storage_root is infailable

* Nit

* Move assert after check.

* Apply suggestions from @DemiMarie-parity

Co-Authored-By: default avatarpepyakin <[email protected]>

* Formatting nit in core/executor/src/wasm_executor.rs

Co-Authored-By: default avatarDemiMarie-parity <[email protected]>

* Formatting nits from @thiolliere
parent f6605cf4
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