Skip to content

Commit

Permalink
Merge pull request #116 from filecoin-project/fix/assign_unpacked_deals
Browse files Browse the repository at this point in the history
Deal Sealing: fix try to change the status of the man-made zeroed-pieces
  • Loading branch information
diwufeiwen authored Mar 31, 2022
2 parents acc968e + e24aff2 commit b1f698d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion storageprovider/deal_assigner.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import (
"math"
"sort"

"github.com/filecoin-project/go-fil-markets/piecestore"
"go.uber.org/fx"
"golang.org/x/xerrors"

"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-fil-markets/piecestore"
"github.com/filecoin-project/go-state-types/abi"
"github.com/ipfs/go-cid"

"github.com/filecoin-project/venus-market/config"
"github.com/filecoin-project/venus-market/models/repo"
Expand Down Expand Up @@ -222,6 +223,9 @@ func (ps *dealAssigner) AssignUnPackedDeals(ctx context.Context, miner address.A
// TODO: is this concurrent safe?
if err := ps.repo.Transaction(func(txRepo repo.TxRepo) error {
for _, piece := range pieces {
if piece.DealID <= 0 || piece.PublishCid == cid.Undef {
continue
}
md, err := txRepo.StorageDealRepo().GetDealByDealID(ctx, miner, piece.DealID)
if err != nil {
return err
Expand Down

0 comments on commit b1f698d

Please sign in to comment.