Kaynağa Gözat

added pw param to cli_config

lunar-mining 5 yıl önce
ebeveyn
işleme
71f1e0eeab
1 değiştirilmiş dosya ile 6 ekleme ve 1 silme
  1. 6 1
      src/cli/client_cli/cli_config.rs

+ 6 - 1
src/cli/client_cli/cli_config.rs

@@ -45,6 +45,7 @@ pub struct DarkfidCliConfig {
     pub rpc_url: String,
     pub database_path: String,
     pub log_path: String,
+    pub password: String,
 }
 
 impl Default for DrkCliConfig {
@@ -66,6 +67,7 @@ impl Encodable for DarkfidCliConfig {
         len += self.rpc_url.encode(&mut s)?;
         len += self.database_path.encode(&mut s)?;
         len += self.log_path.encode(&mut s)?;
+        len += self.password.encode(&mut s)?;
         Ok(len)
     }
 }
@@ -78,6 +80,7 @@ impl Decodable for DarkfidCliConfig {
             rpc_url: Decodable::decode(&mut d)?,
             database_path: Decodable::decode(&mut d)?,
             log_path: Decodable::decode(&mut d)?,
+            password: Decodable::decode(&mut d)?,
         })
     }
 }
@@ -97,14 +100,16 @@ impl Default for DarkfidCliConfig {
                 .to_str()
                 .expect("error convert Path to String"),
         );
-
         let log_path = String::from("/tmp/darkfid_service_daemon.log");
+        
+        let password = String::new();
         Self {
             connect_url,
             subscriber_url,
             rpc_url,
             database_path,
             log_path,
+            password,
         }
     }
 }