cli: print nicer message when miner hasn't initialized

Signed-off-by: jsign <jsign.uy@gmail.com>
This commit is contained in:
jsign 2019-12-13 17:05:43 -03:00
parent 71011d03fe
commit ac1875f040
No known key found for this signature in database
GPG Key ID: DA262F049E3BCD7C

View File

@ -299,6 +299,9 @@ var clientQueryAskCmd = &cli.Command{
if ret.ExitCode != 0 { if ret.ExitCode != 0 {
return fmt.Errorf("call to GetPeerID was unsuccesful (exit code %d)", ret.ExitCode) return fmt.Errorf("call to GetPeerID was unsuccesful (exit code %d)", ret.ExitCode)
} }
if peer.ID(ret.Return) == peer.ID("SETME") {
return fmt.Errorf("the miner hasn't initialized yet")
}
p, err := peer.IDFromBytes(ret.Return) p, err := peer.IDFromBytes(ret.Return)
if err != nil { if err != nil {