Skip to content

Commit a366e5c

Browse files
committed
feat: add UpdateDirectDealPayloadCID
1 parent 17d3293 commit a366e5c

File tree

4 files changed

+49
-3
lines changed

4 files changed

+49
-3
lines changed

venus-shared/api/market/v1/api.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ type IMarket interface {
198198
GetDirectDealByAllocationID(ctx context.Context, id types.AllocationId) (*market.DirectDeal, error) //perm:read
199199
ListDirectDeals(ctx context.Context, queryParams market.DirectDealQueryParams) ([]*market.DirectDeal, error) //perm:read
200200
UpdateDirectDealState(ctx context.Context, id uuid.UUID, state market.DirectDealState) error //perm:write
201+
UpdateDirectDealPayloadCID(ctx context.Context, id uuid.UUID, payloadCID cid.Cid) error //perm:write
201202

202203
UpdateStorageDealPayloadSize(ctx context.Context, dealProposal cid.Cid, payloadSize uint64) error //perm:write
203204

venus-shared/api/market/v1/method.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ curl http://<ip>:<port>/rpc/v1 -X POST -H "Content-Type: application/json" -H "
114114
* [SectorSetExpectedSealDuration](#sectorsetexpectedsealduration)
115115
* [UpdateDealOnPacking](#updatedealonpacking)
116116
* [UpdateDealStatus](#updatedealstatus)
117+
* [UpdateDirectDealPayloadCID](#updatedirectdealpayloadcid)
117118
* [UpdateDirectDealState](#updatedirectdealstate)
118119
* [UpdateStorageDealPayloadSize](#updatestoragedealpayloadsize)
119120
* [UpdateStorageDealStatus](#updatestoragedealstatus)
@@ -1049,6 +1050,9 @@ Response:
10491050
"Client": "f01234",
10501051
"Provider": "f01234",
10511052
"PayloadSize": 42,
1053+
"PayloadCID": {
1054+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
1055+
},
10521056
"State": 1,
10531057
"AllocationID": 42,
10541058
"ClaimID": 42,
@@ -1086,6 +1090,9 @@ Response:
10861090
"Client": "f01234",
10871091
"Provider": "f01234",
10881092
"PayloadSize": 42,
1093+
"PayloadCID": {
1094+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
1095+
},
10891096
"State": 1,
10901097
"AllocationID": 42,
10911098
"ClaimID": 42,
@@ -1218,12 +1225,12 @@ Inputs:
12181225
[
12191226
{
12201227
"SkipCommP": true,
1221-
"NoCopyCarFile": true,
1222-
"SkipGenerateIndex": true,
12231228
"DealParams": [
12241229
{
1225-
"FilePath": "string value",
12261230
"PayloadSize": 42,
1231+
"PayloadCID": {
1232+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
1233+
},
12271234
"DealUUID": "07070707-0707-0707-0707-070707070707",
12281235
"AllocationID": 42,
12291236
"PieceCID": {
@@ -1377,6 +1384,9 @@ Response:
13771384
"Client": "f01234",
13781385
"Provider": "f01234",
13791386
"PayloadSize": 42,
1387+
"PayloadCID": {
1388+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
1389+
},
13801390
"State": 1,
13811391
"AllocationID": 42,
13821392
"ClaimID": 42,
@@ -2870,6 +2880,23 @@ Inputs:
28702880

28712881
Response: `{}`
28722882

2883+
### UpdateDirectDealPayloadCID
2884+
2885+
2886+
Perms: write
2887+
2888+
Inputs:
2889+
```json
2890+
[
2891+
"07070707-0707-0707-0707-070707070707",
2892+
{
2893+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
2894+
}
2895+
]
2896+
```
2897+
2898+
Response: `{}`
2899+
28732900
### UpdateDirectDealState
28742901

28752902

venus-shared/api/market/v1/mock/mock_imarket.go

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

venus-shared/api/market/v1/proxy_gen.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)