Skip to content

Commit

Permalink
reptop: add PerrId nil check
Browse files Browse the repository at this point in the history
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
  • Loading branch information
jsign committed May 11, 2021
1 parent fda942d commit 471a506
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ffs/minerselector/reptop/reptop.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ func (rt *RepTop) getMinerProposal(f ffs.MinerSelectorFilter, addrStr string) (f
return ffs.MinerProposal{}, fmt.Errorf("getting miner %s info: %s", addr, err)
}

if mi.PeerId == nil {
return ffs.MinerProposal{}, fmt.Errorf("the miner %s doesn't specify a peer id", addr)
}

type chAskRes struct {
Error string
Ask *storagemarket.StorageAsk
Expand Down

0 comments on commit 471a506

Please sign in to comment.