storageminer: Don't start fPoSt with every head change

This commit is contained in:
Łukasz Magiera
2019-12-03 23:00:04 +01:00
parent 3c271db802
commit a65320c970
+5 -3
View File
@@ -102,10 +102,12 @@ func (s *fpostScheduler) update(ctx context.Context, new *types.TipSet) error {
return err
}
if newEPS != s.activeEPS {
s.abortActivePoSt()
if newEPS == s.activeEPS {
return nil
}
s.abortActivePoSt()
if newEPS != Inactive && start {
s.doPost(ctx, newEPS, new)
}
@@ -124,7 +126,7 @@ func (s *fpostScheduler) abortActivePoSt() {
log.Warnf("Aborting Fallback PoSt (EPS: %d)", s.activeEPS)
s.activeEPS = 0
s.activeEPS = Inactive
s.abort = nil
}