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
@@ -30,8 +30,8 @@ use sc_cli::{
version
)]
pub enum Subkey {
/// 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
@@ -40,7 +40,7 @@ pub enum Subkey {
/// 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),
/// Sign a message, with a given (secret) key.