From 078044153f598e486b37c9044f52fc376e15e2cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Thu, 1 Oct 2020 21:07:39 +0200 Subject: [PATCH] pcr: Appease the linter --- cmd/lotus-pcr/main.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/lotus-pcr/main.go b/cmd/lotus-pcr/main.go index 70568a17a..4ce5bbb9f 100644 --- a/cmd/lotus-pcr/main.go +++ b/cmd/lotus-pcr/main.go @@ -615,6 +615,10 @@ func (r *refunder) FindMiners(ctx context.Context, tipset *types.TipSet, refunds // Look up and find all addresses associated with the miner minerInfo, err := r.api.StateMinerInfo(ctx, maddr, tipset.Key()) + if err != nil { + log.Errorw("failed", "err", err, "height", tipset.Height(), "key", tipset.Key(), "miner", maddr) + continue + } allAddresses := []address.Address{} @@ -673,7 +677,7 @@ func (r *refunder) EnsureMinerMinimums(ctx context.Context, tipset *types.TipSet return nil, err } - defer f.Close() + defer f.Close() // nolint:errcheck w = bufio.NewWriter(f) } @@ -703,6 +707,10 @@ func (r *refunder) EnsureMinerMinimums(ctx context.Context, tipset *types.TipSet // Look up and find all addresses associated with the miner minerInfo, err := r.api.StateMinerInfo(ctx, maddr, tipset.Key()) + if err != nil { + log.Errorw("failed", "err", err, "height", tipset.Height(), "key", tipset.Key(), "miner", maddr) + continue + } allAddresses := []address.Address{minerInfo.Worker, minerInfo.Owner} allAddresses = append(allAddresses, minerInfo.ControlAddresses...)