Do not include :code in the storage proof if not required (#480)

This is basically a hack that prevents the inclusion of `:code` in the
storage proof. A proper fix requires some changes to the trie crate to
not include nodes that aren't read.
This commit is contained in:
Bastian Köcher
2021-06-07 16:17:19 +02:00
committed by GitHub
parent 0a5dbafd53
commit acb2bc4f00
10 changed files with 59 additions and 8 deletions
@@ -556,6 +556,18 @@ pub mod pallet {
matches!(call, Call::set_validation_data(_))
}
}
#[pallet::genesis_config]
#[derive(Default)]
pub struct GenesisConfig;
#[pallet::genesis_build]
impl<T: Config> GenesisBuild<T> for GenesisConfig {
fn build(&self) {
//TODO: Remove after https://github.com/paritytech/cumulus/issues/479
sp_io::storage::set(b":c", &[]);
}
}
}
impl<T: Config> Pallet<T> {