From b29e3b5242704d4a8a82f07abcc195016417a1b3 Mon Sep 17 00:00:00 2001 From: hannahhoward Date: Wed, 14 Oct 2020 21:28:36 -0700 Subject: [PATCH] feat(markets): use build.BlockDelaySecs for start buffer instead of constant from spec-actors which uses hardcoded start epoch, use one that factors in possibility of different block time --- node/modules/storageminer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/modules/storageminer.go b/node/modules/storageminer.go index adacf5405..cd5517a1c 100644 --- a/node/modules/storageminer.go +++ b/node/modules/storageminer.go @@ -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 }