I have a slightly custom chain spec that makes regular chain spec serializable with serde to/from JSON.
In the impl of sp_runtime::BuildStorage
I just forward assimilate_storage
call to the underlying chain spec:
impl<GenesisConfig, Extensions> BuildStorage for SerializableChainSpec<GenesisConfig, Extensions>
where
GenesisConfig: RuntimeGenesis,
{
fn assimilate_storage(&self, storage: &mut Storage) -> Result<(), String> {
self.chain_spec.assimilate_storage(storage)
}
}
This worked great until I tried to run benchmarks, when it failed with:
Error: SubstrateCli(Input("`assimilate_storage` not implemented for `ChainSpec`."))
Not 100% sure what this means and what implementation should have looked like instead, any suggestions?