Make --file optional for generate-node-key (#7043)

This pr makes the `--file` argument optional to `generate-node-key`.
If the argument is not given, the secret node key will be printed to
`stdout`. The public node key will always be printed to `stderr`.
This commit is contained in:
Bastian Köcher
2020-09-08 10:32:37 +02:00
committed by GitHub
parent 186fa587cf
commit ae0f7e58b0
3 changed files with 16 additions and 9 deletions
+2 -1
View File
@@ -31,7 +31,8 @@ use sp_core::crypto::Ss58Codec;
about = "Utility for generating and restoring with Substrate keys",
)]
pub enum Subkey {
/// Generate a random node libp2p key, save it to file and print its peer ID
/// Generate a random node libp2p key, save it to file or print it to stdout
/// and print its peer ID to stderr.
GenerateNodeKey(GenerateNodeKeyCmd),
/// Generate a random account