Make query-ask CLI more graceful

This commit is contained in:
Aayush Rajasekaran 2021-06-24 12:57:54 -04:00
parent 84dbcb63d2
commit cb4d7cb9e7

View File

@ -1759,7 +1759,7 @@ var clientQueryAskCmd = &cli.Command{
return xerrors.Errorf("failed to get peerID for miner: %w", err) 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") return fmt.Errorf("the miner hasn't initialized yet")
} }