瀏覽代碼

cli: enable geyser without specified configs (#2137)

Kirill Fomichev 1 年之前
父節點
當前提交
ede4a1cc98
共有 2 個文件被更改,包括 9 次插入1 次删除
  1. 8 0
      validator/src/cli.rs
  2. 1 1
      validator/src/main.rs

+ 8 - 0
validator/src/cli.rs

@@ -1178,6 +1178,14 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
                 .multiple(true)
                 .help("Specify the configuration file for the Geyser plugin."),
         )
+        .arg(
+            Arg::with_name("geyser_plugin_always_enabled")
+                .long("geyser-plugin-always-enabled")
+                .value_name("BOOLEAN")
+                .takes_value(true)
+                .default_value("false")
+                .help("Еnable Geyser interface even if no Geyser configs are specified."),
+        )
         .arg(
             Arg::with_name("snapshot_archive_format")
                 .long("snapshot-archive-format")

+ 1 - 1
validator/src/main.rs

@@ -1303,7 +1303,7 @@ pub fn main() {
                 .collect(),
         )
     } else {
-        None
+        value_t_or_exit!(matches, "geyser_plugin_always_enabled", bool).then(Vec::new)
     };
     let starting_with_geyser_plugins: bool = on_start_geyser_plugin_config_files.is_some();