sealing: Fix build
This commit is contained in:
parent
724d80cf02
commit
aac1f5abef
23
extern/storage-sealing/input.go
vendored
23
extern/storage-sealing/input.go
vendored
@ -573,21 +573,24 @@ func (m *Sealing) tryGetUpgradeSector(ctx context.Context, sp abi.RegisteredSeal
|
||||
continue
|
||||
}
|
||||
|
||||
active, err := m.sectorActive(ctx, TipSetToken{}, s.Number)
|
||||
if err != nil {
|
||||
log.Errorw("checking sector active", "error", err)
|
||||
continue
|
||||
}
|
||||
if !active {
|
||||
log.Debugw("skipping available sector", "reason", "not active")
|
||||
continue
|
||||
slowChecks := func() bool {
|
||||
active, err := m.sectorActive(ctx, TipSetToken{}, s.Number)
|
||||
if err != nil {
|
||||
log.Errorw("checking sector active", "error", err)
|
||||
return false
|
||||
}
|
||||
if !active {
|
||||
log.Debugw("skipping available sector", "reason", "not active")
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// if best is below target, we want larger expirations
|
||||
// if best is above target, we want lower pledge, but only if still above target
|
||||
|
||||
if bestExpiration < targetExpiration {
|
||||
if expiration > bestExpiration {
|
||||
if expiration > bestExpiration && slowChecks() {
|
||||
bestExpiration = expiration
|
||||
bestPledge = pledge
|
||||
candidate = s
|
||||
@ -595,7 +598,7 @@ func (m *Sealing) tryGetUpgradeSector(ctx context.Context, sp abi.RegisteredSeal
|
||||
continue
|
||||
}
|
||||
|
||||
if expiration >= targetExpiration && pledge.LessThan(bestPledge) {
|
||||
if expiration >= targetExpiration && pledge.LessThan(bestPledge) && slowChecks() {
|
||||
bestExpiration = expiration
|
||||
bestPledge = pledge
|
||||
candidate = s
|
||||
|
2
extern/storage-sealing/states_failed.go
vendored
2
extern/storage-sealing/states_failed.go
vendored
@ -238,7 +238,7 @@ func (m *Sealing) handleSubmitReplicaUpdateFailed(ctx statemachine.Context, sect
|
||||
}
|
||||
|
||||
// Abort upgrade for sectors that went faulty since being marked for upgrade
|
||||
active, err := sectorActive(ctx.Context(), m.Api, m.maddr, tok, sector.SectorNumber)
|
||||
active, err := m.sectorActive(ctx.Context(), tok, sector.SectorNumber)
|
||||
if err != nil {
|
||||
log.Errorf("sector active check: api error, not proceeding: %+v", err)
|
||||
return nil
|
||||
|
@ -41,7 +41,7 @@ func (m *Sealing) handleProveReplicaUpdate(ctx statemachine.Context, sector Sect
|
||||
log.Errorf("handleProveReplicaUpdate: api error, not proceeding: %+v", err)
|
||||
return nil
|
||||
}
|
||||
active, err := sectorActive(ctx.Context(), m.Api, m.maddr, tok, sector.SectorNumber)
|
||||
active, err := m.sectorActive(ctx.Context(), tok, sector.SectorNumber)
|
||||
if err != nil {
|
||||
log.Errorf("sector active check: api error, not proceeding: %+v", err)
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user