Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Agusrodri committed Jun 23, 2023
1 parent 6b612a7 commit 1fc48bb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
1 change: 1 addition & 0 deletions pallets/author-slot-filter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ mod mock;
#[cfg(test)]
mod tests;

#[allow(deprecated)]
#[pallet]
pub mod pallet {

Expand Down
4 changes: 2 additions & 2 deletions parachain-template/node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub struct RelayChainCli {
pub chain_id: Option<String>,

/// The base path that should be used by the relay chain.
pub base_path: Option<PathBuf>,
pub base_path: PathBuf,
}

impl RelayChainCli {
Expand All @@ -77,7 +77,7 @@ impl RelayChainCli {
let chain_id = extension.map(|e| e.relay_chain.clone());
let base_path = para_config.base_path.path().join("polkadot");
Self {
base_path: Some(base_path),
base_path,
chain_id,
base: clap::Parser::parse_from(relay_chain_args),
}
Expand Down
2 changes: 1 addition & 1 deletion parachain-template/node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ impl CliConfiguration<Self> for RelayChainCli {
Ok(self
.shared_params()
.base_path()?
.or_else(|| self.base_path.clone().map(Into::into)))
.or_else(|| Some(self.base_path.clone().into())))
}

fn rpc_addr(&self, default_listen_port: u16) -> Result<Option<SocketAddr>> {
Expand Down
21 changes: 14 additions & 7 deletions parachain-template/node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use polkadot_service::CollatorPair;
// Substrate Imports
use sc_consensus::ImportQueue;
use sc_consensus_manual_seal::{run_instant_seal, InstantSealParams};
use sc_executor::NativeElseWasmExecutor;
use sc_executor::{NativeElseWasmExecutor, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY, HeapAllocStrategy};
use sc_network::{config::FullNetworkConfiguration, NetworkBlock};
use sc_network_sync::SyncingService;
use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager};
Expand Down Expand Up @@ -107,12 +107,19 @@ where
})
.transpose()?;

let executor = sc_executor::NativeElseWasmExecutor::<Executor>::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::<Executor>::new_with_wasm_executor(wasm);

let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts::<Block, RuntimeApi, _>(
Expand Down

0 comments on commit 1fc48bb

Please sign in to comment.