From baf26c6dc883dade04947ff4632eb1e664fb55b9 Mon Sep 17 00:00:00 2001 From: LexLuthr <88259624+LexLuthr@users.noreply.github.com> Date: Tue, 16 Jan 2024 16:53:56 +0400 Subject: [PATCH] fix: don't fail deals that have passed AP() but are not indexed (#1872) * don't fail AP() deals * fix error --- storagemarket/provider.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/storagemarket/provider.go b/storagemarket/provider.go index b61d88610..61b9b415e 100644 --- a/storagemarket/provider.go +++ b/storagemarket/provider.go @@ -449,10 +449,12 @@ func (p *Provider) Start() error { continue } - // Fail deals if start epoch has passed - if err := p.checkDealProposalStartEpoch(deal); err != nil { - go p.failDeal(dh.Publisher, deal, err, false) - continue + // Fail deals if start epoch has passed and deal has still not been added to a sector + if deal.Checkpoint < dealcheckpoints.AddedPiece { + if serr := p.checkDealProposalStartEpoch(deal); serr != nil { + go p.failDeal(dh.Publisher, deal, serr, false) + continue + } } // If it's an offline deal, and the deal data hasn't yet been