Merge pull request #911 from jsign/fix810

cli: print nicer message when miner hasn't initialized
This commit is contained in:
Łukasz Magiera 2019-12-16 23:49:38 +01:00 committed by GitHub
commit 4ace1fe436
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -303,6 +303,9 @@ var clientQueryAskCmd = &cli.Command{
if ret.ExitCode != 0 {
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)
if err != nil {