From 471a506a5f9a106a7e5ee3b9ae4f6e57a509d206 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Tue, 11 May 2021 09:41:27 -0300 Subject: [PATCH] reptop: add PerrId nil check Signed-off-by: Ignacio Hagopian --- ffs/minerselector/reptop/reptop.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ffs/minerselector/reptop/reptop.go b/ffs/minerselector/reptop/reptop.go index 6eca1dcad..9ffd33cf1 100644 --- a/ffs/minerselector/reptop/reptop.go +++ b/ffs/minerselector/reptop/reptop.go @@ -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