Improve inspection and generation of node keys (#11525)

* Improve inspection and generation of node keys

* Lock stdout before write

* Fix typo

* Fix offset

* Remove useless code

* Set inspect-node-key 'network' option as obsolete
This commit is contained in:
Davide Galassi
2022-06-09 18:55:02 +01:00
committed by GitHub
parent 9765f200cb
commit f2d578b678
4 changed files with 66 additions and 26 deletions
+3 -3
View File
@@ -26,8 +26,8 @@ use crate::{Error, SubstrateCli};
/// Key utilities for the cli.
#[derive(Debug, clap::Subcommand)]
pub enum KeySubcommand {
/// Generate a random node libp2p key, save it to file or print it to stdout
/// and print its peer ID to stderr.
/// Generate a random node key, write it to a file or stdout and write the
/// corresponding peer-id to stderr
GenerateNodeKey(GenerateNodeKeyCmd),
/// Generate a random account
@@ -36,7 +36,7 @@ pub enum KeySubcommand {
/// Gets a public key and a SS58 address from the provided Secret URI
Inspect(InspectKeyCmd),
/// Print the peer ID corresponding to the node key in the given file
/// Load a node key from a file or stdin and print the corresponding peer-id
InspectNodeKey(InspectNodeKeyCmd),
/// Insert a key to the keystore of a node.