Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add generate peer id command #2114

Merged
merged 1 commit into from
Jun 12, 2020

Conversation

driftluo
Copy link
Collaborator

@driftluo driftluo commented Jun 9, 2020

add generate peer id command

$ ./target/debug/ckb peer-id gen --secret_path ./a.txt
$ ./target/debug/ckb peer-id from-secret --secret-path ./a.txt
peer_id: QmYKM9CJhSsn8kBoAmUGdKiS9kbnJA2f9TXohgNBPKxogB

@driftluo driftluo requested review from a team and zhangsoledad June 9, 2020 06:14
util/app-config/src/cli.rs Outdated Show resolved Hide resolved
util/app-config/src/cli.rs Outdated Show resolved Hide resolved
@driftluo driftluo force-pushed the add-peer-id-cmd branch 3 times, most recently from 92820bf to 0e6a277 Compare June 10, 2020 03:35
util/app-config/src/cli.rs Outdated Show resolved Hide resolved
@quake
Copy link
Member

quake commented Jun 10, 2020

I prefer to use stdin/stdout for these helper functions:

./ckb peer-id gen > key
cat key | ./ckb peer-id show

@yangby-cryptape
Copy link
Collaborator

I prefer to use stdin/stdout for these helper functions:

./ckb peer-id gen > key
cat key | ./ckb peer-id show

When the output is binary, usually the default method is output to a file, for example, gzip, bzip2, ssh-key and so on. It's a protection behavior.
Otherwise, after people try ./ckb peer-id gen before they read the manual, they have to reset their terminal. For some terminal tools, they have to restart their terminal tools (both tmux and screen has bug when stdout is binary data). They may lost some data which on terminal before run ./ckb peer-id gen.

@driftluo
Copy link
Collaborator Author

bors r=quake,yangby-cryptape

@bors
Copy link
Contributor

bors bot commented Jun 12, 2020

Build succeeded:

@bors bors bot merged commit df0ab9b into nervosnetwork:develop Jun 12, 2020
@driftluo driftluo deleted the add-peer-id-cmd branch June 12, 2020 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants