Add storage_version() and runtime_wasm_code() to storage (#1111)

* add storage_version function

* get runtime code

* add tests

* clippy fix

* just support CODE, remove other well known keys

* remove u16 wrapper
This commit is contained in:
Tadeo Hepperle
2023-08-10 15:40:38 +02:00
committed by GitHub
parent b97acc5df6
commit 9723a50969
4 changed files with 72 additions and 4 deletions
+1 -1
View File
@@ -389,7 +389,7 @@ impl<T: Config, C: OnlineClientT<T>> TxInBlock<T, C> {
.iter()
.position(|ext| {
use crate::config::Hasher;
let Ok((_,stripped)) = strip_compact_prefix(&ext.0) else {
let Ok((_, stripped)) = strip_compact_prefix(&ext.0) else {
return false;
};
let hash = T::Hasher::hash_of(&stripped);