Skip to content

Commit

Permalink
Merge pull request #265 from filecoin-project/feat/tanlang/integrate-…
Browse files Browse the repository at this point in the history
…CIDgravity

feat: integrate CIDgravity
  • Loading branch information
diwufeiwen authored Dec 30, 2022
2 parents 443e34c + bd5b2e3 commit 5486870
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions dealfilter/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import (
"os/exec"

"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-fil-markets/storagemarket"

"github.com/filecoin-project/venus-market/v2/config"
vsTypes "github.com/filecoin-project/venus/venus-shared/types"
types "github.com/filecoin-project/venus/venus-shared/types/market"
)

Expand All @@ -19,12 +21,21 @@ func CliStorageDealFilter(cfg *config.MarketConfig) config.StorageDealFilter {
return true, "", nil
}

isOffline := false
if deal.Ref != nil && deal.Ref.TransferType == storagemarket.TTManual {
isOffline = true
}

d := struct {
*types.MinerDeal
IsOffline bool
vsTypes.ClientDealProposal
DealType string
Agent string
}{
MinerDeal: deal,
DealType: "piecestorage",
IsOffline: isOffline,
ClientDealProposal: deal.ClientDealProposal,
DealType: "storage",
Agent: "venus-market",
}
return runDealFilter(ctx, pCfg.Filter, d)
}
Expand Down

0 comments on commit 5486870

Please sign in to comment.