Просмотр исходного кода

bin/tau: remove key arg and only use the key from file

Dastan-glitch 4 лет назад
Родитель
Сommit
9f87c561fa
4 измененных файлов с 3 добавлено и 22 удалено
  1. 3 10
      bin/tau/README.md
  2. 0 6
      bin/tau/taud/src/main.rs
  3. 0 3
      bin/tau/taud/src/settings.rs
  4. 0 3
      bin/tau/taud_config.toml

+ 3 - 10
bin/tau/README.md

@@ -39,15 +39,8 @@ Also note that for the first time ever running seed node you must run it with
 ```
 ```
 This will generate a new secret key in `/home/${USER}/.config/tau/secret_key` that 
 This will generate a new secret key in `/home/${USER}/.config/tau/secret_key` that 
 you can share with nodes you want them to get and decrypt your tasks, otherwise if you
 you can share with nodes you want them to get and decrypt your tasks, otherwise if you
-have already generated or got a copy from a peer place it either in the same directory
-`/home/${USER}/.config/tau/secret_key`, or in the config file.
-	
-	in config file:
-
-		## Secret key
-		key="SECRET_KEY_GOES_HERE"
-
-DO NOT use `--key` in terminal to pass the secret key.
+have already generated or got a copy from a peer place it in the same directory
+`/home/${USER}/.config/tau/secret_key`.
 
 
 ### Inbound Node
 ### Inbound Node
 
 
@@ -153,7 +146,7 @@ Output:
 ### List tasks with filters
 ### List tasks with filters
 
 
 ```shell
 ```shell
-% tau all   		 # lists all tasks
+% tau  		   		 # lists all tasks
 % tau open 			 # lists currently open tasks
 % tau open 			 # lists currently open tasks
 % tau pause 		 # lists currently paused tasks
 % tau pause 		 # lists currently paused tasks
 % tau 0522 		 	 # lists tasks created at May 2022
 % tau 0522 		 	 # lists tasks created at May 2022

+ 0 - 6
bin/tau/taud/src/main.rs

@@ -98,12 +98,6 @@ async fn realmain(settings: Args, executor: Arc<Executor<'_>>) -> Result<()> {
         let sk_string = hex::encode(secret.as_bytes());
         let sk_string = hex::encode(secret.as_bytes());
         save::<String>(&datastore_path.join("secret_key"), &sk_string)?;
         save::<String>(&datastore_path.join("secret_key"), &sk_string)?;
         secret
         secret
-    } else if settings.key.is_some() {
-        let sk_str = settings.key.unwrap();
-        save::<String>(&datastore_path.join("secret_key"), &sk_str)?;
-        let sk_bytes = hex::decode(sk_str)?;
-        let sk_bytes: [u8; KEY_SIZE] = sk_bytes.as_slice().try_into()?;
-        SecretKey::try_from(sk_bytes)?
     } else {
     } else {
         let loaded_key = match load::<String>(&datastore_path.join("secret_key")) {
         let loaded_key = match load::<String>(&datastore_path.join("secret_key")) {
             Ok(key) => key,
             Ok(key) => key,

+ 0 - 3
bin/tau/taud/src/settings.rs

@@ -31,7 +31,4 @@ pub struct Args {
     /// Generate a new secret key
     /// Generate a new secret key
     #[structopt(long)]
     #[structopt(long)]
     pub key_gen: bool,
     pub key_gen: bool,
-    /// Load a secret key
-    #[structopt(long)]
-    pub key: Option<String>,
 }
 }

+ 0 - 3
bin/tau/taud_config.toml

@@ -4,9 +4,6 @@
 ## Sets Datastore Path
 ## Sets Datastore Path
 #datastore="~/.config/tau"
 #datastore="~/.config/tau"
 
 
-## Secret key
-#key=""
-
 ## Raft net settings
 ## Raft net settings
 [net]
 [net]
 ## P2P accept address
 ## P2P accept address