From 4aaf01f6bc2c86f0e5bf98bb1e7eb3c30cbd5042 Mon Sep 17 00:00:00 2001 From: Gregory Sobol Date: Sat, 25 Feb 2023 13:19:40 +0300 Subject: [PATCH] add param (#29) --- client/cli/src/commands/run_cmd.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/cli/src/commands/run_cmd.rs b/client/cli/src/commands/run_cmd.rs index 9441acecc4dfc..950428b99174b 100644 --- a/client/cli/src/commands/run_cmd.rs +++ b/client/cli/src/commands/run_cmd.rs @@ -264,6 +264,9 @@ pub struct RunCmd { /// When `--dev` is given and no explicit `--base-path`, this option is implied. #[arg(long, conflicts_with = "base_path")] pub tmp: bool, + + #[arg(long, default_value_t = 0x4000)] + pub default_heap_pages: u32, } impl RunCmd { @@ -493,6 +496,10 @@ impl CliConfiguration for RunCmd { } }) } + + fn default_heap_pages(&self) -> Result> { + Ok(Some(self.default_heap_pages as u64)) + } } /// Check whether a node name is considered as valid.