Rename and use --max-heap-pages parameter (#1666)

This commit is contained in:
Stanislav Tkach
2019-02-05 13:35:12 +02:00
committed by Gav Wood
parent 888e7bb76f
commit df685c9e53
10 changed files with 45 additions and 34 deletions
+3
View File
@@ -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);
+2 -2
View File
@@ -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())?;