mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
bin/tau: remove key arg and only use the key from file
This commit is contained in:
@@ -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
|
||||
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
|
||||
|
||||
@@ -153,7 +146,7 @@ Output:
|
||||
### List tasks with filters
|
||||
|
||||
```shell
|
||||
% tau all # lists all tasks
|
||||
% tau # lists all tasks
|
||||
% tau open # lists currently open tasks
|
||||
% tau pause # lists currently paused tasks
|
||||
% tau 0522 # lists tasks created at May 2022
|
||||
|
||||
@@ -98,12 +98,6 @@ async fn realmain(settings: Args, executor: Arc<Executor<'_>>) -> Result<()> {
|
||||
let sk_string = hex::encode(secret.as_bytes());
|
||||
save::<String>(&datastore_path.join("secret_key"), &sk_string)?;
|
||||
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 {
|
||||
let loaded_key = match load::<String>(&datastore_path.join("secret_key")) {
|
||||
Ok(key) => key,
|
||||
|
||||
@@ -31,7 +31,4 @@ pub struct Args {
|
||||
/// Generate a new secret key
|
||||
#[structopt(long)]
|
||||
pub key_gen: bool,
|
||||
/// Load a secret key
|
||||
#[structopt(long)]
|
||||
pub key: Option<String>,
|
||||
}
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
## Sets Datastore Path
|
||||
#datastore="~/.config/tau"
|
||||
|
||||
## Secret key
|
||||
#key=""
|
||||
|
||||
## Raft net settings
|
||||
[net]
|
||||
## P2P accept address
|
||||
|
||||
Reference in New Issue
Block a user