mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 21:01:05 +00:00
Rename and use --max-heap-pages parameter (#1666)
This commit is contained in:
committed by
Gav Wood
parent
888e7bb76f
commit
df685c9e53
@@ -67,6 +67,8 @@ pub struct Configuration<C, G: Serialize + DeserializeOwned + BuildStorage> {
|
||||
pub rpc_ws: Option<SocketAddr>,
|
||||
/// Telemetry service URL. `None` if disabled.
|
||||
pub telemetry_url: Option<String>,
|
||||
/// The default number of 64KB pages to allocate for Wasm execution
|
||||
pub default_heap_pages: Option<u64>,
|
||||
}
|
||||
|
||||
impl<C: Default, G: Serialize + DeserializeOwned + BuildStorage> Configuration<C, G> {
|
||||
@@ -92,6 +94,7 @@ impl<C: Default, G: Serialize + DeserializeOwned + BuildStorage> Configuration<C
|
||||
rpc_http: None,
|
||||
rpc_ws: None,
|
||||
telemetry_url: None,
|
||||
default_heap_pages: None,
|
||||
};
|
||||
configuration.network.boot_nodes = configuration.chain_spec.boot_nodes().to_vec();
|
||||
configuration.telemetry_url = configuration.chain_spec.telemetry_url().map(str::to_owned);
|
||||
|
||||
@@ -113,7 +113,7 @@ pub struct Service<Components: components::Components> {
|
||||
pub fn new_client<Factory: components::ServiceFactory>(config: &FactoryFullConfiguration<Factory>)
|
||||
-> Result<Arc<ComponentClient<components::FullComponents<Factory>>>, error::Error>
|
||||
{
|
||||
let executor = NativeExecutor::new();
|
||||
let executor = NativeExecutor::new(config.default_heap_pages);
|
||||
let (client, _) = components::FullComponents::<Factory>::build_client(
|
||||
config,
|
||||
executor,
|
||||
@@ -132,7 +132,7 @@ impl<Components: components::Components> Service<Components> {
|
||||
let (signal, exit) = ::exit_future::signal();
|
||||
|
||||
// Create client
|
||||
let executor = NativeExecutor::new();
|
||||
let executor = NativeExecutor::new(config.default_heap_pages);
|
||||
|
||||
let mut keystore = Keystore::open(config.keystore_path.as_str().into())?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user