Merge pull request #6590 from filecoin-project/asr/query-ask-cli

Make query-ask CLI more graceful
This commit is contained in:
Łukasz Magiera 2021-06-24 19:59:08 +02:00 committed by GitHub
commit 1c025e49c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1759,7 +1759,7 @@ var clientQueryAskCmd = &cli.Command{
return xerrors.Errorf("failed to get peerID for miner: %w", err)
}
if *mi.PeerId == peer.ID("SETME") {
if mi.PeerId == nil || *mi.PeerId == peer.ID("SETME") {
return fmt.Errorf("the miner hasn't initialized yet")
}