mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 22:11:06 +00:00
* primitives/core: Derive scale_info::TypeInfo for runtime APIs Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * parachains: Derive scale_info::TypeInfo for FungiblesAccessError Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * parachains: Fix `TypeInfo` import path Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * update lockfile for {"polkadot", "substrate"} * Adjust testing for the new API Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Adjust deprecated methods Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: parity-processbot <>
This commit is contained in:
+15
-6
@@ -21,6 +21,7 @@
|
||||
pub mod chain_spec;
|
||||
mod genesis;
|
||||
|
||||
use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY};
|
||||
use std::{
|
||||
future::Future,
|
||||
net::{IpAddr, Ipv4Addr, SocketAddr},
|
||||
@@ -184,12 +185,20 @@ pub fn new_partial(
|
||||
>,
|
||||
sc_service::Error,
|
||||
> {
|
||||
let executor = sc_executor::NativeElseWasmExecutor::<RuntimeExecutor>::new(
|
||||
config.wasm_method,
|
||||
config.default_heap_pages,
|
||||
config.max_runtime_instances,
|
||||
config.runtime_cache_size,
|
||||
);
|
||||
let heap_pages = config
|
||||
.default_heap_pages
|
||||
.map_or(DEFAULT_HEAP_ALLOC_STRATEGY, |h| HeapAllocStrategy::Static { extra_pages: h as _ });
|
||||
|
||||
let wasm = WasmExecutor::builder()
|
||||
.with_execution_method(config.wasm_method)
|
||||
.with_onchain_heap_alloc_strategy(heap_pages)
|
||||
.with_offchain_heap_alloc_strategy(heap_pages)
|
||||
.with_max_runtime_instances(config.max_runtime_instances)
|
||||
.with_runtime_cache_size(config.runtime_cache_size)
|
||||
.build();
|
||||
|
||||
let executor =
|
||||
sc_executor::NativeElseWasmExecutor::<RuntimeExecutor>::new_with_wasm_executor(wasm);
|
||||
|
||||
let (client, backend, keystore_container, task_manager) =
|
||||
sc_service::new_full_parts::<Block, RuntimeApi, _>(config, None, executor)?;
|
||||
|
||||
Reference in New Issue
Block a user