Skip to content

Commit

Permalink
pcr: Appease the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Oct 1, 2020
1 parent 9b42746 commit 0780441
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/lotus-pcr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}

Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -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...)
Expand Down

0 comments on commit 0780441

Please sign in to comment.