瀏覽代碼

add networks field to cashierd config file

ghassmo 4 年之前
父節點
當前提交
3a3e1c4f57
共有 2 個文件被更改,包括 18 次插入0 次删除
  1. 9 0
      example/config/cashierd.toml
  2. 9 0
      src/cli/cli_config.rs

+ 9 - 0
example/config/cashierd.toml

@@ -5,5 +5,14 @@ log_path = "/tmp/cashierd.log"
 password = "TEST_PASSWORD"
 client_password = "TEST_PASSWORD"
 
+[[networks]]
+name = "btc"
+blockchain = "testnet"
+
+[[networks]]
+name = "sol"
+blockchain = "testnet"
+
+
 
 

+ 9 - 0
src/cli/cli_config.rs

@@ -72,6 +72,12 @@ pub struct GatewaydConfig {
     pub log_path: String,
 }
 
+#[derive(Clone, Debug, Serialize, Deserialize)]
+pub struct FeatureNetwork {
+    pub name: String,
+    pub blockchain: String,
+}
+
 #[derive(Clone, Serialize, Deserialize, Debug)]
 pub struct CashierdConfig {
     #[serde(rename = "rpc_url")]
@@ -91,4 +97,7 @@ pub struct CashierdConfig {
 
     #[serde(rename = "client_password")]
     pub client_password: String,
+
+    #[serde(rename = "networks")]
+    pub networks: Vec<FeatureNetwork>,
 }