Commit 02c8d076 authored by suyanlong's avatar suyanlong

remove hub client function

parent 7755849f
...@@ -95,31 +95,10 @@ type Client interface { ...@@ -95,31 +95,10 @@ type Client interface {
// Get link33's signatures specified by id and type. // Get link33's signatures specified by id and type.
GetMultiSigns(id string, typ pb.GetMultiSignsRequest_Type) (*pb.SignResponse, error) GetMultiSigns(id string, typ pb.GetMultiSignsRequest_Type) (*pb.SignResponse, error)
// Get link33 TPS during block [begin, end]
GetTPS(begin, end uint64) (uint64, error)
// GetPendingNonceByAccount returns the latest nonce of an account in the pending status, // GetPendingNonceByAccount returns the latest nonce of an account in the pending status,
// and it should be the nonce for next transaction // and it should be the nonce for next transaction
GetPendingNonceByAccount(account string) (uint64, error) GetPendingNonceByAccount(account string) (uint64, error)
// Delete node according to its pid
DelVPNode(pid string) (*pb.Response, error)
// IPFSPutFromLocal puts local file to ipfs network
IPFSPutFromLocal(localfPath string) (*pb.Response, error)
// IPFSGet gets from ipfs network
IPFSGet(path string) (*pb.Response, error)
// IPFSGetToLocal gets from ipfs and saves to local file path
IPFSGetToLocal(path string, localfPath string) (*pb.Response, error)
// Check whethe there is a master sidecar connect to the link33.
CheckMasterSidecar(address string) (*pb.Response, error)
// Set the master sidecar connect to the link33.
SetMasterSidecar(address string, index string, timeout int64) (*pb.Response, error)
// Update the master sidecar status
HeartBeat(address string, index string) (*pb.Response, error) HeartBeat(address string, index string) (*pb.Response, error)
} }
......
...@@ -38,36 +38,6 @@ func (m *MockClient) EXPECT() *MockClientMockRecorder { ...@@ -38,36 +38,6 @@ func (m *MockClient) EXPECT() *MockClientMockRecorder {
return m.recorder return m.recorder
} }
// CheckMasterSidecar mocks base method.
func (m *MockClient) CheckMasterSidecar(address string) (*pb.Response, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CheckMasterSidecar", address)
ret0, _ := ret[0].(*pb.Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CheckMasterSidecar indicates an expected call of CheckMasterSidecar.
func (mr *MockClientMockRecorder) CheckMasterSidecar(address interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckMasterSidecar", reflect.TypeOf((*MockClient)(nil).CheckMasterSidecar), address)
}
// DelVPNode mocks base method.
func (m *MockClient) DelVPNode(pid string) (*pb.Response, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DelVPNode", pid)
ret0, _ := ret[0].(*pb.Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DelVPNode indicates an expected call of DelVPNode.
func (mr *MockClientMockRecorder) DelVPNode(pid interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelVPNode", reflect.TypeOf((*MockClient)(nil).DelVPNode), pid)
}
// DeployContract mocks base method. // DeployContract mocks base method.
func (m *MockClient) DeployContract(contract []byte, opts *rpcx.TransactOpts) (*types.Address, error) { func (m *MockClient) DeployContract(contract []byte, opts *rpcx.TransactOpts) (*types.Address, error) {
m.ctrl.T.Helper() m.ctrl.T.Helper()
...@@ -281,21 +251,6 @@ func (mr *MockClientMockRecorder) GetReceipt(hash interface{}) *gomock.Call { ...@@ -281,21 +251,6 @@ func (mr *MockClientMockRecorder) GetReceipt(hash interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReceipt", reflect.TypeOf((*MockClient)(nil).GetReceipt), hash) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReceipt", reflect.TypeOf((*MockClient)(nil).GetReceipt), hash)
} }
// GetTPS mocks base method.
func (m *MockClient) GetTPS(begin, end uint64) (uint64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetTPS", begin, end)
ret0, _ := ret[0].(uint64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetTPS indicates an expected call of GetTPS.
func (mr *MockClientMockRecorder) GetTPS(begin, end interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTPS", reflect.TypeOf((*MockClient)(nil).GetTPS), begin, end)
}
// GetTransaction mocks base method. // GetTransaction mocks base method.
func (m *MockClient) GetTransaction(hash string) (*pb.GetTransactionResponse, error) { func (m *MockClient) GetTransaction(hash string) (*pb.GetTransactionResponse, error) {
m.ctrl.T.Helper() m.ctrl.T.Helper()
...@@ -341,51 +296,6 @@ func (mr *MockClientMockRecorder) HeartBeat(address, index interface{}) *gomock. ...@@ -341,51 +296,6 @@ func (mr *MockClientMockRecorder) HeartBeat(address, index interface{}) *gomock.
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HeartBeat", reflect.TypeOf((*MockClient)(nil).HeartBeat), address, index) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HeartBeat", reflect.TypeOf((*MockClient)(nil).HeartBeat), address, index)
} }
// IPFSGet mocks base method.
func (m *MockClient) IPFSGet(path string) (*pb.Response, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IPFSGet", path)
ret0, _ := ret[0].(*pb.Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// IPFSGet indicates an expected call of IPFSGet.
func (mr *MockClientMockRecorder) IPFSGet(path interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IPFSGet", reflect.TypeOf((*MockClient)(nil).IPFSGet), path)
}
// IPFSGetToLocal mocks base method.
func (m *MockClient) IPFSGetToLocal(path, localfPath string) (*pb.Response, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IPFSGetToLocal", path, localfPath)
ret0, _ := ret[0].(*pb.Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// IPFSGetToLocal indicates an expected call of IPFSGetToLocal.
func (mr *MockClientMockRecorder) IPFSGetToLocal(path, localfPath interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IPFSGetToLocal", reflect.TypeOf((*MockClient)(nil).IPFSGetToLocal), path, localfPath)
}
// IPFSPutFromLocal mocks base method.
func (m *MockClient) IPFSPutFromLocal(localfPath string) (*pb.Response, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IPFSPutFromLocal", localfPath)
ret0, _ := ret[0].(*pb.Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// IPFSPutFromLocal indicates an expected call of IPFSPutFromLocal.
func (mr *MockClientMockRecorder) IPFSPutFromLocal(localfPath interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IPFSPutFromLocal", reflect.TypeOf((*MockClient)(nil).IPFSPutFromLocal), localfPath)
}
// InvokeBVMContract mocks base method. // InvokeBVMContract mocks base method.
func (m *MockClient) InvokeBVMContract(address *types.Address, method string, opts *rpcx.TransactOpts, args ...*pb.Arg) (*pb.Receipt, error) { func (m *MockClient) InvokeBVMContract(address *types.Address, method string, opts *rpcx.TransactOpts, args ...*pb.Arg) (*pb.Receipt, error) {
m.ctrl.T.Helper() m.ctrl.T.Helper()
...@@ -491,21 +401,6 @@ func (mr *MockClientMockRecorder) SendView(tx interface{}) *gomock.Call { ...@@ -491,21 +401,6 @@ func (mr *MockClientMockRecorder) SendView(tx interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendView", reflect.TypeOf((*MockClient)(nil).SendView), tx) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendView", reflect.TypeOf((*MockClient)(nil).SendView), tx)
} }
// SetMasterSidecar mocks base method.
func (m *MockClient) SetMasterSidecar(address, index string, timeout int64) (*pb.Response, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetMasterSidecar", address, index, timeout)
ret0, _ := ret[0].(*pb.Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SetMasterSidecar indicates an expected call of SetMasterSidecar.
func (mr *MockClientMockRecorder) SetMasterSidecar(address, index, timeout interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMasterSidecar", reflect.TypeOf((*MockClient)(nil).SetMasterSidecar), address, index, timeout)
}
// SetPrivateKey mocks base method. // SetPrivateKey mocks base method.
func (m *MockClient) SetPrivateKey(arg0 crypto.PrivateKey) { func (m *MockClient) SetPrivateKey(arg0 crypto.PrivateKey) {
m.ctrl.T.Helper() m.ctrl.T.Helper()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment