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
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
active, err := m.sectorActive(ctx, TipSetToken{}, s.Number)
|
slowChecks := func() bool {
|
||||||
if err != nil {
|
active, err := m.sectorActive(ctx, TipSetToken{}, s.Number)
|
||||||
log.Errorw("checking sector active", "error", err)
|
if err != nil {
|
||||||
continue
|
log.Errorw("checking sector active", "error", err)
|
||||||
}
|
return false
|
||||||
if !active {
|
}
|
||||||
log.Debugw("skipping available sector", "reason", "not active")
|
if !active {
|
||||||
continue
|
log.Debugw("skipping available sector", "reason", "not active")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// if best is below target, we want larger expirations
|
// 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 best is above target, we want lower pledge, but only if still above target
|
||||||
|
|
||||||
if bestExpiration < targetExpiration {
|
if bestExpiration < targetExpiration {
|
||||||
if expiration > bestExpiration {
|
if expiration > bestExpiration && slowChecks() {
|
||||||
bestExpiration = expiration
|
bestExpiration = expiration
|
||||||
bestPledge = pledge
|
bestPledge = pledge
|
||||||
candidate = s
|
candidate = s
|
||||||
@ -595,7 +598,7 @@ func (m *Sealing) tryGetUpgradeSector(ctx context.Context, sp abi.RegisteredSeal
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if expiration >= targetExpiration && pledge.LessThan(bestPledge) {
|
if expiration >= targetExpiration && pledge.LessThan(bestPledge) && slowChecks() {
|
||||||
bestExpiration = expiration
|
bestExpiration = expiration
|
||||||
bestPledge = pledge
|
bestPledge = pledge
|
||||||
candidate = s
|
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
|
// 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 {
|
if err != nil {
|
||||||
log.Errorf("sector active check: api error, not proceeding: %+v", err)
|
log.Errorf("sector active check: api error, not proceeding: %+v", err)
|
||||||
return nil
|
return nil
|
||||||
|
@ -41,7 +41,7 @@ func (m *Sealing) handleProveReplicaUpdate(ctx statemachine.Context, sector Sect
|
|||||||
log.Errorf("handleProveReplicaUpdate: api error, not proceeding: %+v", err)
|
log.Errorf("handleProveReplicaUpdate: api error, not proceeding: %+v", err)
|
||||||
return nil
|
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 {
|
if err != nil {
|
||||||
log.Errorf("sector active check: api error, not proceeding: %+v", err)
|
log.Errorf("sector active check: api error, not proceeding: %+v", err)
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user