fix: lint
This commit is contained in:
parent
32a6224310
commit
6df785b9b3
@ -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 {
|
||||||
|
@ -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) {
|
||||||
|
@ -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{
|
||||||
|
Loading…
Reference in New Issue
Block a user