wasm-builder: Enforce `runtime_version` wasm section (#14228)
* wasm-builder: Enforce `runtime_version` wasm section This pr changes the `wasm-builder` to enforce the `runtime_version` wasm section. This wasm section is being created by the `sp_version::runtime_version` attribute macro. This attribute macro now exists since quite some time and `runtime_version` also is the only way for parachains to support reading the `RuntimeVersion` from the runtime. \# Disabling the check By default the `WasmBuilder` will now check for this wasm section and if not found, exit with an error. However, there are situations where you may want to disable this check (like for tests). In this case there exists the `disable_runtime_version_section_check` function. ``` WasmBuilder::new() ... ... ... .disable_runtime_version_section_check() .build() ``` By using this method you get back the old behavior. * Review comment * Fix * Fix issue with `enum-as-inner`
parent
54022123
Please register or sign in to comment