Skip to content

Commit

Permalink
MarketAPI: improve AssignUnPackedDeals API (#4849)
Browse files Browse the repository at this point in the history
Co-authored-by: 一页素书 <[email protected]>
  • Loading branch information
2 people authored and simlecode committed Apr 26, 2022
1 parent f5d96c4 commit 86341c8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
14 changes: 7 additions & 7 deletions venus-shared/api/market/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ type IMarket interface {
// DagstoreGC runs garbage collection on the DAG store.
DagstoreGC(ctx context.Context) ([]market.DagstoreShardResult, error) //perm:admin

MarkDealsAsPacking(ctx context.Context, miner address.Address, deals []abi.DealID) error //perm:write
UpdateDealOnPacking(ctx context.Context, miner address.Address, dealID abi.DealID, sectorid abi.SectorNumber, offset abi.PaddedPieceSize) error //perm:write
UpdateDealStatus(ctx context.Context, miner address.Address, dealID abi.DealID, pieceStatus market.PieceStatus) error //perm:write
GetDeals(ctx context.Context, miner address.Address, pageIndex, pageSize int) ([]*market.DealInfo, error) //perm:read
AssignUnPackedDeals(ctx context.Context, miner address.Address, ssize abi.SectorSize, spec *market.GetDealSpec) ([]*market.DealInfoIncludePath, error) //perm:write
GetUnPackedDeals(ctx context.Context, miner address.Address, spec *market.GetDealSpec) ([]*market.DealInfoIncludePath, error) //perm:read
UpdateStorageDealStatus(ctx context.Context, dealProposalCid cid.Cid, state storagemarket.StorageDealStatus, pieceState market.PieceStatus) error //perm:write
MarkDealsAsPacking(ctx context.Context, miner address.Address, deals []abi.DealID) error //perm:write
UpdateDealOnPacking(ctx context.Context, miner address.Address, dealID abi.DealID, sectorid abi.SectorNumber, offset abi.PaddedPieceSize) error //perm:write
UpdateDealStatus(ctx context.Context, miner address.Address, dealID abi.DealID, pieceStatus market.PieceStatus) error //perm:write
GetDeals(ctx context.Context, miner address.Address, pageIndex, pageSize int) ([]*market.DealInfo, error) //perm:read
AssignUnPackedDeals(ctx context.Context, sid abi.SectorID, ssize abi.SectorSize, spec *market.GetDealSpec) ([]*market.DealInfoIncludePath, error) //perm:write
GetUnPackedDeals(ctx context.Context, miner address.Address, spec *market.GetDealSpec) ([]*market.DealInfoIncludePath, error) //perm:read
UpdateStorageDealStatus(ctx context.Context, dealProposalCid cid.Cid, state storagemarket.StorageDealStatus, pieceState market.PieceStatus) error //perm:write
//market event
ResponseMarketEvent(ctx context.Context, resp *gateway.ResponseEvent) error //perm:read
ListenMarketEvent(ctx context.Context, policy *gateway.MarketRegisterPolicy) (<-chan *gateway.RequestEvent, error) //perm:read
Expand Down
5 changes: 4 additions & 1 deletion venus-shared/api/market/method.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ Perms: write
Inputs:
```json
[
"f01234",
{
"Miner": 1000,
"Number": 9
},
34359738368,
{
"MaxPiece": 123,
Expand Down
2 changes: 1 addition & 1 deletion venus-shared/api/market/mock/mock_imarket.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions venus-shared/api/market/proxy_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 86341c8

Please sign in to comment.