From ef6620ad8e56d22acdd63492a64839c3c8006fe2 Mon Sep 17 00:00:00 2001 From: He Weidong Date: Wed, 14 Jul 2021 11:52:18 +0800 Subject: [PATCH] reasonable max value for initial sector expiration --- extern/storage-sealing/states_sealing.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extern/storage-sealing/states_sealing.go b/extern/storage-sealing/states_sealing.go index 3aef55f5d..587ad5937 100644 --- a/extern/storage-sealing/states_sealing.go +++ b/extern/storage-sealing/states_sealing.go @@ -311,9 +311,9 @@ func (m *Sealing) preCommitParams(ctx statemachine.Context, sector SectorInfo) ( msd := policy.GetMaxProveCommitDuration(actors.VersionForNetwork(nv), sector.SectorType) - // Assume: both precommit msg & commit msg land on chain as late as possible - minExpiration := sector.TicketEpoch + policy.MaxPreCommitRandomnessLookback + msd + miner.MinSectorExpiration - if expiration < minExpiration { + if minExpiration := height + msd + miner.MinSectorExpiration + 10; expiration < minExpiration { + expiration = minExpiration + } // Assume: both precommit msg & commit msg land on chain as early as possible maxExpiration := height + policy.GetPreCommitChallengeDelay() + policy.GetMaxSectorExpirationExtension()