From e785534870bba1556ef4728ad419309d41e7fef5 Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Fri, 5 May 2023 10:19:30 +0800 Subject: [PATCH] opt: not wait for index results to be generated --- storageprovider/deal_handler.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/storageprovider/deal_handler.go b/storageprovider/deal_handler.go index 22a23c4a..8e607bd5 100644 --- a/storageprovider/deal_handler.go +++ b/storageprovider/deal_handler.go @@ -529,13 +529,11 @@ func (storageDealPorcess *StorageDealProcessImpl) HandleOff(ctx context.Context, } } + log.Infof("register shard. deal:%d, proposalCid:%s, pieceCid:%s", deal.DealID, deal.ProposalCid, deal.Proposal.PieceCID) // Register the deal data as a "shard" with the DAG store. Later it can be // fetched from the DAG store during retrieval. - if err := stores.RegisterShardSync(ctx, storageDealPorcess.dagStore, deal.Proposal.PieceCID, carFilePath, true); err != nil { - err = fmt.Errorf("failed to activate shard: %w", err) - log.Error(err) - } else { - log.Infof("register shard successfully. deal:%d, proposalCid:%s, pieceCid:%s", deal.DealID, deal.ProposalCid, deal.Proposal.PieceCID) + if err := storageDealPorcess.dagStore.RegisterShard(ctx, deal.Proposal.PieceCID, carFilePath, true, nil); err != nil { + log.Errorf("failed to register shard: %v", err) } log.Infow("successfully handed off deal to sealing subsystem", "pieceCid", deal.Proposal.PieceCID, "proposalCid", deal.ProposalCid)