fix: lint

This commit is contained in:
Andrew Jackson (Ajax) 2023-11-29 10:17:52 -06:00
parent 32a6224310
commit 6df785b9b3
3 changed files with 5 additions and 5 deletions

View File

@ -134,7 +134,9 @@ func fromMiner(cctx *cli.Context) (err error) {
if err != nil { if err != nil {
return xerrors.Errorf("opening miner metadata datastore: %w", err) return xerrors.Errorf("opening miner metadata datastore: %w", err)
} }
defer mmeta.Close() defer func() {
_ = mmeta.Close()
}()
maddrBytes, err := mmeta.Get(ctx, datastore.NewKey("miner-address")) maddrBytes, err := mmeta.Get(ctx, datastore.NewKey("miner-address"))
if err != nil { if err != nil {

View File

@ -486,9 +486,7 @@ func (mb MiningBase) baseTime() time.Time {
} }
func (mb MiningBase) afterPropDelay() time.Time { func (mb MiningBase) afterPropDelay() time.Time {
base := mb.baseTime() return mb.baseTime().Add(randTimeOffset(time.Second))
base.Add(randTimeOffset(time.Second))
return base
} }
func (t *WinPostTask) mineBasic(ctx context.Context) { func (t *WinPostTask) mineBasic(ctx context.Context) {

View File

@ -478,7 +478,7 @@ func (mgr *SectorMgr) StageFakeData(mid abi.ActorID, spt abi.RegisteredSealProof
} }
buf := make([]byte, usize) buf := make([]byte, usize)
_, _ = rand.Read(buf) // nolint:gosec _, _ = rand.Read(buf) // nolint:gosec lint:ignore SA1019 we need predictable "randomness" here
id := storiface.SectorRef{ id := storiface.SectorRef{
ID: abi.SectorID{ ID: abi.SectorID{