Limit the maximum number of wasm memory pages a runtime can have (#9308)

* Limit the maximum number of wasm memory pages a runtime can have

* Switch the argument order

* fmt
This commit is contained in:
Sergei Shulepov
2021-08-02 21:15:07 +02:00
committed by GitHub
parent b14d4f07aa
commit 92b8e0680c
3 changed files with 177 additions and 2 deletions
@@ -321,6 +321,7 @@ pub fn create_wasm_runtime_with_code(
blob,
sc_executor_wasmtime::Config {
heap_pages: heap_pages as u32,
max_memory_pages: None,
allow_missing_func_imports,
cache_path: cache_path.map(ToOwned::to_owned),
semantics: sc_executor_wasmtime::Semantics {