Merge pull request #4415 from filecoin-project/feat/use-build-seconds-delay

Use build.BlockDelaySecs for deal start buffer
This commit is contained in:
Łukasz Magiera 2020-10-15 11:56:43 +02:00 committed by GitHub
commit 90d2a92a2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -474,7 +474,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 := earliest + abi.ChainEpoch(7*builtin.EpochsInDay)
maxStartEpoch := earliest + abi.ChainEpoch(7*builtin.SecondsInDay/build.BlockDelaySecs)
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
}