review fixes

This commit is contained in:
Geoff Stuart
2022-10-06 11:06:21 -04:00
parent 97b04b7f77
commit b5c5e6627e
41 changed files with 331 additions and 328 deletions
+4 -4
View File
@@ -532,10 +532,10 @@ type FullNode interface {
StateMarketDeals(context.Context, types.TipSetKey) (map[string]*api.MarketDeal, error) //perm:read
// StateMarketStorageDeal returns information about the indicated deal
StateMarketStorageDeal(context.Context, abi.DealID, types.TipSetKey) (*api.MarketDeal, error) //perm:read
// StateGetDealAllocation returns the allocation ID for a given deal ID.
StateGetDealAllocation(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*verifregtypes.Allocation, error)
// StateGetAllocation returns the allocation ID for a given address and allocation ID.
StateGetAllocation(ctx context.Context, addr address.Address, allocationId verifregtypes.AllocationId, tsk types.TipSetKey) (*verifregtypes.Allocation, error) //perm:read
// StateGetAllocationForPendingDeal returns the allocation for a given deal ID of a pending deal.
StateGetAllocationForPendingDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*verifregtypes.Allocation, error)
// StateGetAllocation returns the allocation for a given address and allocation ID.
StateGetAllocation(ctx context.Context, clientAddr address.Address, allocationId verifregtypes.AllocationId, tsk types.TipSetKey) (*verifregtypes.Allocation, error) //perm:read
// StateLookupID retrieves the ID address of the given address
StateLookupID(context.Context, address.Address, types.TipSetKey) (address.Address, error) //perm:read
// StateAccountKey returns the public key address of the given ID address
+5 -5
View File
@@ -280,7 +280,7 @@ type FullNodeStruct struct {
StateGetAllocation func(p0 context.Context, p1 address.Address, p2 verifregtypes.AllocationId, p3 types.TipSetKey) (*verifregtypes.Allocation, error) `perm:"read"`
StateGetDealAllocation func(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*verifregtypes.Allocation, error) ``
StateGetAllocationForPendingDeal func(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*verifregtypes.Allocation, error) ``
StateGetNetworkParams func(p0 context.Context) (*api.NetworkParams, error) `perm:"read"`
@@ -1809,14 +1809,14 @@ func (s *FullNodeStub) StateGetAllocation(p0 context.Context, p1 address.Address
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateGetDealAllocation(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*verifregtypes.Allocation, error) {
if s.Internal.StateGetDealAllocation == nil {
func (s *FullNodeStruct) StateGetAllocationForPendingDeal(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*verifregtypes.Allocation, error) {
if s.Internal.StateGetAllocationForPendingDeal == nil {
return nil, ErrNotSupported
}
return s.Internal.StateGetDealAllocation(p0, p1, p2)
return s.Internal.StateGetAllocationForPendingDeal(p0, p1, p2)
}
func (s *FullNodeStub) StateGetDealAllocation(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*verifregtypes.Allocation, error) {
func (s *FullNodeStub) StateGetAllocationForPendingDeal(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*verifregtypes.Allocation, error) {
return nil, ErrNotSupported
}
+6 -6
View File
@@ -2338,19 +2338,19 @@ func (mr *MockFullNodeMockRecorder) StateGetAllocation(arg0, arg1, arg2, arg3 in
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetAllocation", reflect.TypeOf((*MockFullNode)(nil).StateGetAllocation), arg0, arg1, arg2, arg3)
}
// StateGetDealAllocation mocks base method.
func (m *MockFullNode) StateGetDealAllocation(arg0 context.Context, arg1 abi.DealID, arg2 types.TipSetKey) (*verifreg.Allocation, error) {
// StateGetAllocationForPendingDeal mocks base method.
func (m *MockFullNode) StateGetAllocationForPendingDeal(arg0 context.Context, arg1 abi.DealID, arg2 types.TipSetKey) (*verifreg.Allocation, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetDealAllocation", arg0, arg1, arg2)
ret := m.ctrl.Call(m, "StateGetAllocationForPendingDeal", arg0, arg1, arg2)
ret0, _ := ret[0].(*verifreg.Allocation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetDealAllocation indicates an expected call of StateGetDealAllocation.
func (mr *MockFullNodeMockRecorder) StateGetDealAllocation(arg0, arg1, arg2 interface{}) *gomock.Call {
// StateGetAllocationForPendingDeal indicates an expected call of StateGetAllocationForPendingDeal.
func (mr *MockFullNodeMockRecorder) StateGetAllocationForPendingDeal(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetDealAllocation", reflect.TypeOf((*MockFullNode)(nil).StateGetDealAllocation), arg0, arg1, arg2)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetAllocationForPendingDeal", reflect.TypeOf((*MockFullNode)(nil).StateGetAllocationForPendingDeal), arg0, arg1, arg2)
}
// StateGetNetworkParams mocks base method.