Skip to content

Commit

Permalink
Merge pull request #8131 from FlorianRuen/master
Browse files Browse the repository at this point in the history
fix:cli:Continue instead of return error if no valid value is filled
  • Loading branch information
magik6k authored Feb 20, 2022
2 parents 051ff5d + 623272a commit 214c32d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cli/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,8 @@ uiLoop:

state = "miner"
case "miner":
maddrs = maddrs[:0]
ask = ask[:0]
afmt.Print("Miner Addresses (f0.. f0..), none to find: ")

_maddrsStr, _, err := rl.ReadLine()
Expand Down Expand Up @@ -802,7 +804,8 @@ uiLoop:

dealCount, err = strconv.ParseInt(string(dealcStr), 10, 64)
if err != nil {
return err
printErr(xerrors.Errorf("reading deal count: invalid number"))
continue
}

color.Blue(".. Picking miners")
Expand Down Expand Up @@ -859,12 +862,13 @@ uiLoop:

a, err := api.ClientQueryAsk(ctx, *mi.PeerId, maddr)
if err != nil {
printErr(xerrors.Errorf("failed to query ask: %w", err))
printErr(xerrors.Errorf("failed to query ask for miner %s: %w", maddr.String(), err))
state = "miner"
continue uiLoop
}

ask = append(ask, *a)

}

// TODO: run more validation
Expand Down

0 comments on commit 214c32d

Please sign in to comment.