From 811c837d0e10b9862890cc1b45b7ef7c1fc0e8c0 Mon Sep 17 00:00:00 2001 From: hunjixin <1084400399@qq.com> Date: Wed, 16 Mar 2022 16:08:15 +0800 Subject: [PATCH] change api arg type --- venus-shared/api/market/api.go | 4 ++-- venus-shared/api/market/method.md | 4 ++-- venus-shared/api/market/mock/mock_imarket.go | 4 ++-- venus-shared/api/market/proxy_gen.go | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/venus-shared/api/market/api.go b/venus-shared/api/market/api.go index 8021ba31b0..a3d814fd86 100644 --- a/venus-shared/api/market/api.go +++ b/venus-shared/api/market/api.go @@ -130,11 +130,11 @@ type IMarket interface { 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 string) 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 string) error //perm:write + 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 diff --git a/venus-shared/api/market/method.md b/venus-shared/api/market/method.md index b7b4af025a..6f4044bff2 100644 --- a/venus-shared/api/market/method.md +++ b/venus-shared/api/market/method.md @@ -1726,7 +1726,7 @@ Inputs: [ "f01234", 5432, - "string value" + "Undefine" ] ``` @@ -1744,7 +1744,7 @@ Inputs: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, 42, - "string value" + "Undefine" ] ``` diff --git a/venus-shared/api/market/mock/mock_imarket.go b/venus-shared/api/market/mock/mock_imarket.go index 83e4e33145..bc99c04928 100644 --- a/venus-shared/api/market/mock/mock_imarket.go +++ b/venus-shared/api/market/mock/mock_imarket.go @@ -1047,7 +1047,7 @@ func (mr *MockIMarketMockRecorder) UpdateDealOnPacking(arg0, arg1, arg2, arg3, a } // UpdateDealStatus mocks base method. -func (m *MockIMarket) UpdateDealStatus(arg0 context.Context, arg1 address.Address, arg2 abi.DealID, arg3 string) error { +func (m *MockIMarket) UpdateDealStatus(arg0 context.Context, arg1 address.Address, arg2 abi.DealID, arg3 market.PieceStatus) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UpdateDealStatus", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(error) @@ -1061,7 +1061,7 @@ func (mr *MockIMarketMockRecorder) UpdateDealStatus(arg0, arg1, arg2, arg3 inter } // UpdateStorageDealStatus mocks base method. -func (m *MockIMarket) UpdateStorageDealStatus(arg0 context.Context, arg1 cid.Cid, arg2 uint64, arg3 string) error { +func (m *MockIMarket) UpdateStorageDealStatus(arg0 context.Context, arg1 cid.Cid, arg2 uint64, arg3 market.PieceStatus) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UpdateStorageDealStatus", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(error) diff --git a/venus-shared/api/market/proxy_gen.go b/venus-shared/api/market/proxy_gen.go index 83774136de..d226a83cdb 100644 --- a/venus-shared/api/market/proxy_gen.go +++ b/venus-shared/api/market/proxy_gen.go @@ -90,8 +90,8 @@ type IMarketStruct struct { SectorGetSealDelay func(context.Context) (time.Duration, error) `perm:"read"` SectorSetExpectedSealDuration func(context.Context, time.Duration) error `perm:"write"` UpdateDealOnPacking func(ctx context.Context, miner address.Address, dealID abi.DealID, sectorid abi.SectorNumber, offset abi.PaddedPieceSize) error `perm:"write"` - UpdateDealStatus func(ctx context.Context, miner address.Address, dealID abi.DealID, pieceStatus string) error `perm:"write"` - UpdateStorageDealStatus func(ctx context.Context, dealProposalCid cid.Cid, state storagemarket.StorageDealStatus, pieceState string) error `perm:"write"` + UpdateDealStatus func(ctx context.Context, miner address.Address, dealID abi.DealID, pieceStatus market.PieceStatus) error `perm:"write"` + UpdateStorageDealStatus func(ctx context.Context, dealProposalCid cid.Cid, state storagemarket.StorageDealStatus, pieceState market.PieceStatus) error `perm:"write"` } } @@ -297,9 +297,9 @@ func (s *IMarketStruct) SectorSetExpectedSealDuration(p0 context.Context, p1 tim func (s *IMarketStruct) UpdateDealOnPacking(p0 context.Context, p1 address.Address, p2 abi.DealID, p3 abi.SectorNumber, p4 abi.PaddedPieceSize) error { return s.Internal.UpdateDealOnPacking(p0, p1, p2, p3, p4) } -func (s *IMarketStruct) UpdateDealStatus(p0 context.Context, p1 address.Address, p2 abi.DealID, p3 string) error { +func (s *IMarketStruct) UpdateDealStatus(p0 context.Context, p1 address.Address, p2 abi.DealID, p3 market.PieceStatus) error { return s.Internal.UpdateDealStatus(p0, p1, p2, p3) } -func (s *IMarketStruct) UpdateStorageDealStatus(p0 context.Context, p1 cid.Cid, p2 storagemarket.StorageDealStatus, p3 string) error { +func (s *IMarketStruct) UpdateStorageDealStatus(p0 context.Context, p1 cid.Cid, p2 storagemarket.StorageDealStatus, p3 market.PieceStatus) error { return s.Internal.UpdateStorageDealStatus(p0, p1, p2, p3) }