Use generic hash for runtime wasm in resolve_state_version_from_wasm (#3447)
Changes the runtime hash algorithm used in
`resolve_state_version_from_wasm` from `DefaultHasher` to a
caller-provided one (usually `HashingFor<Block>`), to match the one used
elsewhere.
This fixes an issue where the runtime wasm is compiled 3 times when
starting the `tanssi-node` with `--dev`. With this fix, the runtime wasm
is only compiled 2 times. The other redundant compilation is caused by
the `GenesisConfigBuilderRuntimeCaller` struct, which ignores the
runtime cache.
---------
Co-authored-by:
Bastian Köcher <git@kchr.de>
Showing
- prdoc/pr_3447.prdoc 13 additions, 0 deletionsprdoc/pr_3447.prdoc
- substrate/client/chain-spec/src/genesis_block.rs 8 additions, 10 deletionssubstrate/client/chain-spec/src/genesis_block.rs
- substrate/client/service/src/client/client.rs 4 additions, 2 deletionssubstrate/client/service/src/client/client.rs
Please register or sign in to comment