Use seal-duration in calculating the earliest StartEpoch that we will consider (#4337)

This commit is contained in:
Ingar Shu
2020-10-12 17:45:37 -03:00
committed by GitHub
parent 8d769f0c07
commit 49155ace62
+1 -1
View File
@@ -473,7 +473,7 @@ func BasicDealFilter(user dtypes.DealFilter) func(onlineOk dtypes.ConsiderOnline
// Reject if it's more than 7 days in the future
// TODO: read from cfg
maxStartEpoch := ht + abi.ChainEpoch(7*builtin.EpochsInDay)
maxStartEpoch := earliest + abi.ChainEpoch(7*builtin.EpochsInDay)
if deal.Proposal.StartEpoch > maxStartEpoch {
return false, fmt.Sprintf("deal start epoch is too far in the future: %s > %s", deal.Proposal.StartEpoch, maxStartEpoch), nil
}