Skip to content

Commit

Permalink
Merge pull request #4415 from filecoin-project/feat/use-build-seconds…
Browse files Browse the repository at this point in the history
…-delay

Use build.BlockDelaySecs for deal start buffer
  • Loading branch information
magik6k authored Oct 15, 2020
2 parents 2818353 + b29e3b5 commit 90d2a92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node/modules/storageminer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 90d2a92

Please sign in to comment.