Unverified Commit b8acc57c authored by Michal Kucharczyk's avatar Michal Kucharczyk Committed by GitHub
Browse files

`sc-chain-spec`: add support for custom host functions (#2190)



Genesis building in runtime may involve calling some custom host
functions. This PR allows to pass `HostFunctions` into the `ChainSpec`
struct, which in turn are passed to `WasmExecutor`. The `ChainSpec` now
has extended host functions type parameter:
```
pub struct ChainSpec<G, E = NoExtension, EHF = ()>
```
which will be combined with the default set
(`sp_io::SubstrateHostFunctions`) in an instance of `WasmExecutor` used
to build the genesis config.

Fix for #2188

---------

Co-authored-by: default avatarDavide Galassi <[email protected]>
Co-authored-by: default avatarBastian Köcher <[email protected]>
parent ffa0e30e
Pipeline #411197 canceled with stages
in 38 minutes and 58 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