mirror of
https://source.quilibrium.com/quilibrium/ceremonyclient.git
synced 2024-11-10 18:25:17 +00:00
Add CLI flag to print peer id from config (#34)
* Add CLI flag to print peer id from config * Add printing peer id instructions to readme
This commit is contained in:
parent
673b815ce8
commit
bb71c38a39
@ -17,6 +17,14 @@ If you do not, or have already run the above, run:
|
||||
|
||||
GOEXPERIMENT=arenas go run ./...
|
||||
|
||||
## Peer ID
|
||||
|
||||
In order to find the peer id of a running node, execute the following command from the `node/` folder:
|
||||
|
||||
GOEXPERIMENT=arenas go run ./... --peer-id
|
||||
|
||||
The peer id will be printed to stdout.
|
||||
|
||||
## EXPERIMENTAL – gRPC/REST Support
|
||||
|
||||
If you want to enable gRPC/REST, add the following entries to your config.yml:
|
||||
|
16
node/main.go
16
node/main.go
@ -38,11 +38,27 @@ var (
|
||||
false,
|
||||
"starts the node in database console mode",
|
||||
)
|
||||
|
||||
peerId = flag.Bool(
|
||||
"peer-id",
|
||||
false,
|
||||
"print the peer id to stdout from the config and exit",
|
||||
)
|
||||
)
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
if *peerId {
|
||||
config, err := config.LoadConfig(*configDirectory, "")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
printPeerID(config.P2P)
|
||||
return
|
||||
}
|
||||
|
||||
if *importPrivKey != "" {
|
||||
config, err := config.LoadConfig(*configDirectory, *importPrivKey)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user