Skip to content

feat: add generate peer id command#2114

Merged
bors[bot] merged 1 commit intonervosnetwork:developfrom
driftluo:add-peer-id-cmd
Jun 12, 2020
Merged

feat: add generate peer id command#2114
bors[bot] merged 1 commit intonervosnetwork:developfrom
driftluo:add-peer-id-cmd

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
@driftluo driftluo force-pushed the add-peer-id-cmd branch 3 times, most recently from 92820bf to 0e6a277 Compare June 10, 2020 03:35
@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

@chaoticlonghair
Copy link
Contributor

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.

3 participants