|
|
|
@ -16,58 +16,42 @@ import (
|
|
|
|
|
network "github.com/meshplus/go-lightp2p"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// MockPeerManager is a mock of PeerManager interface
|
|
|
|
|
// MockPeerManager is a mock of PeerManager interface.
|
|
|
|
|
type MockPeerManager struct {
|
|
|
|
|
ctrl *gomock.Controller
|
|
|
|
|
recorder *MockPeerManagerMockRecorder
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MockPeerManagerMockRecorder is the mock recorder for MockPeerManager
|
|
|
|
|
// MockPeerManagerMockRecorder is the mock recorder for MockPeerManager.
|
|
|
|
|
type MockPeerManagerMockRecorder struct {
|
|
|
|
|
mock *MockPeerManager
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewMockPeerManager creates a new mock instance
|
|
|
|
|
// NewMockPeerManager creates a new mock instance.
|
|
|
|
|
func NewMockPeerManager(ctrl *gomock.Controller) *MockPeerManager {
|
|
|
|
|
mock := &MockPeerManager{ctrl: ctrl}
|
|
|
|
|
mock.recorder = &MockPeerManagerMockRecorder{mock}
|
|
|
|
|
return mock
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use
|
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
|
|
|
func (m *MockPeerManager) EXPECT() *MockPeerManagerMockRecorder {
|
|
|
|
|
return m.recorder
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Start mocks base method
|
|
|
|
|
func (m *MockPeerManager) Start() error {
|
|
|
|
|
// AddNode mocks base method.
|
|
|
|
|
func (m *MockPeerManager) AddNode(newNodeID uint64, vpInfo *pb.VpInfo) {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "Start")
|
|
|
|
|
ret0, _ := ret[0].(error)
|
|
|
|
|
return ret0
|
|
|
|
|
m.ctrl.Call(m, "AddNode", newNodeID, vpInfo)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Start indicates an expected call of Start
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) Start() *gomock.Call {
|
|
|
|
|
// AddNode indicates an expected call of AddNode.
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) AddNode(newNodeID, vpInfo interface{}) *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockPeerManager)(nil).Start))
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNode", reflect.TypeOf((*MockPeerManager)(nil).AddNode), newNodeID, vpInfo)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Stop mocks base method
|
|
|
|
|
func (m *MockPeerManager) Stop() error {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "Stop")
|
|
|
|
|
ret0, _ := ret[0].(error)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Stop indicates an expected call of Stop
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) Stop() *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockPeerManager)(nil).Stop))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AsyncSend mocks base method
|
|
|
|
|
// AsyncSend mocks base method.
|
|
|
|
|
func (m *MockPeerManager) AsyncSend(arg0 uint64, arg1 *pb.Message) error {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "AsyncSend", arg0, arg1)
|
|
|
|
@ -75,27 +59,107 @@ func (m *MockPeerManager) AsyncSend(arg0 uint64, arg1 *pb.Message) error {
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AsyncSend indicates an expected call of AsyncSend
|
|
|
|
|
// AsyncSend indicates an expected call of AsyncSend.
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) AsyncSend(arg0, arg1 interface{}) *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AsyncSend", reflect.TypeOf((*MockPeerManager)(nil).AsyncSend), arg0, arg1)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// SendWithStream mocks base method
|
|
|
|
|
func (m *MockPeerManager) SendWithStream(arg0 network.Stream, arg1 *pb.Message) error {
|
|
|
|
|
// Broadcast mocks base method.
|
|
|
|
|
func (m *MockPeerManager) Broadcast(arg0 *pb.Message) error {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "SendWithStream", arg0, arg1)
|
|
|
|
|
ret := m.ctrl.Call(m, "Broadcast", arg0)
|
|
|
|
|
ret0, _ := ret[0].(error)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// SendWithStream indicates an expected call of SendWithStream
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) SendWithStream(arg0, arg1 interface{}) *gomock.Call {
|
|
|
|
|
// Broadcast indicates an expected call of Broadcast.
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) Broadcast(arg0 interface{}) *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendWithStream", reflect.TypeOf((*MockPeerManager)(nil).SendWithStream), arg0, arg1)
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Broadcast", reflect.TypeOf((*MockPeerManager)(nil).Broadcast), arg0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Send mocks base method
|
|
|
|
|
// CountConnectedPeers mocks base method.
|
|
|
|
|
func (m *MockPeerManager) CountConnectedPeers() uint64 {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "CountConnectedPeers")
|
|
|
|
|
ret0, _ := ret[0].(uint64)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CountConnectedPeers indicates an expected call of CountConnectedPeers.
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) CountConnectedPeers() *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CountConnectedPeers", reflect.TypeOf((*MockPeerManager)(nil).CountConnectedPeers))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DelNode mocks base method.
|
|
|
|
|
func (m *MockPeerManager) DelNode(delID uint64) {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
m.ctrl.Call(m, "DelNode", delID)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DelNode indicates an expected call of DelNode.
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) DelNode(delID interface{}) *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelNode", reflect.TypeOf((*MockPeerManager)(nil).DelNode), delID)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Disconnect mocks base method.
|
|
|
|
|
func (m *MockPeerManager) Disconnect(vpInfos map[uint64]*pb.VpInfo) {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
m.ctrl.Call(m, "Disconnect", vpInfos)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Disconnect indicates an expected call of Disconnect.
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) Disconnect(vpInfos interface{}) *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Disconnect", reflect.TypeOf((*MockPeerManager)(nil).Disconnect), vpInfos)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// OtherPeers mocks base method.
|
|
|
|
|
func (m *MockPeerManager) OtherPeers() map[uint64]*peer.AddrInfo {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "OtherPeers")
|
|
|
|
|
ret0, _ := ret[0].(map[uint64]*peer.AddrInfo)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// OtherPeers indicates an expected call of OtherPeers.
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) OtherPeers() *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OtherPeers", reflect.TypeOf((*MockPeerManager)(nil).OtherPeers))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Peers mocks base method.
|
|
|
|
|
func (m *MockPeerManager) Peers() map[uint64]*pb.VpInfo {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "Peers")
|
|
|
|
|
ret0, _ := ret[0].(map[uint64]*pb.VpInfo)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Peers indicates an expected call of Peers.
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) Peers() *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Peers", reflect.TypeOf((*MockPeerManager)(nil).Peers))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// PierManager mocks base method.
|
|
|
|
|
func (m *MockPeerManager) PierManager() peermgr.PierManager {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "PierManager")
|
|
|
|
|
ret0, _ := ret[0].(peermgr.PierManager)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// PierManager indicates an expected call of PierManager.
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) PierManager() *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PierManager", reflect.TypeOf((*MockPeerManager)(nil).PierManager))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Send mocks base method.
|
|
|
|
|
func (m *MockPeerManager) Send(arg0 uint64, arg1 *pb.Message) (*pb.Message, error) {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "Send", arg0, arg1)
|
|
|
|
@ -104,69 +168,55 @@ func (m *MockPeerManager) Send(arg0 uint64, arg1 *pb.Message) (*pb.Message, erro
|
|
|
|
|
return ret0, ret1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Send indicates an expected call of Send
|
|
|
|
|
// Send indicates an expected call of Send.
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) Send(arg0, arg1 interface{}) *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockPeerManager)(nil).Send), arg0, arg1)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Broadcast mocks base method
|
|
|
|
|
func (m *MockPeerManager) Broadcast(arg0 *pb.Message) error {
|
|
|
|
|
// SendWithStream mocks base method.
|
|
|
|
|
func (m *MockPeerManager) SendWithStream(arg0 network.Stream, arg1 *pb.Message) error {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "Broadcast", arg0)
|
|
|
|
|
ret := m.ctrl.Call(m, "SendWithStream", arg0, arg1)
|
|
|
|
|
ret0, _ := ret[0].(error)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Broadcast indicates an expected call of Broadcast
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) Broadcast(arg0 interface{}) *gomock.Call {
|
|
|
|
|
// SendWithStream indicates an expected call of SendWithStream.
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) SendWithStream(arg0, arg1 interface{}) *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Broadcast", reflect.TypeOf((*MockPeerManager)(nil).Broadcast), arg0)
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendWithStream", reflect.TypeOf((*MockPeerManager)(nil).SendWithStream), arg0, arg1)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CountConnectedPeers mocks base method
|
|
|
|
|
func (m *MockPeerManager) CountConnectedPeers() uint64 {
|
|
|
|
|
// Start mocks base method.
|
|
|
|
|
func (m *MockPeerManager) Start() error {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "CountConnectedPeers")
|
|
|
|
|
ret0, _ := ret[0].(uint64)
|
|
|
|
|
ret := m.ctrl.Call(m, "Start")
|
|
|
|
|
ret0, _ := ret[0].(error)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CountConnectedPeers indicates an expected call of CountConnectedPeers
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) CountConnectedPeers() *gomock.Call {
|
|
|
|
|
// Start indicates an expected call of Start.
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) Start() *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CountConnectedPeers", reflect.TypeOf((*MockPeerManager)(nil).CountConnectedPeers))
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockPeerManager)(nil).Start))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Peers mocks base method
|
|
|
|
|
func (m *MockPeerManager) Peers() map[uint64]*pb.VpInfo {
|
|
|
|
|
// Stop mocks base method.
|
|
|
|
|
func (m *MockPeerManager) Stop() error {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "Peers")
|
|
|
|
|
ret0, _ := ret[0].(map[uint64]*pb.VpInfo)
|
|
|
|
|
ret := m.ctrl.Call(m, "Stop")
|
|
|
|
|
ret0, _ := ret[0].(error)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Peers indicates an expected call of Peers
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) Peers() *gomock.Call {
|
|
|
|
|
// Stop indicates an expected call of Stop.
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) Stop() *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Peers", reflect.TypeOf((*MockPeerManager)(nil).Peers))
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockPeerManager)(nil).Stop))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// OtherPeers mocks base method
|
|
|
|
|
func (m *MockPeerManager) OtherPeers() map[uint64]*peer.AddrInfo {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "OtherPeers")
|
|
|
|
|
ret0, _ := ret[0].(map[uint64]*peer.AddrInfo)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// OtherPeers indicates an expected call of OtherPeers
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) OtherPeers() *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OtherPeers", reflect.TypeOf((*MockPeerManager)(nil).OtherPeers))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// SubscribeOrderMessage mocks base method
|
|
|
|
|
// SubscribeOrderMessage mocks base method.
|
|
|
|
|
func (m *MockPeerManager) SubscribeOrderMessage(ch chan<- events.OrderMessageEvent) event.Subscription {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "SubscribeOrderMessage", ch)
|
|
|
|
@ -174,37 +224,13 @@ func (m *MockPeerManager) SubscribeOrderMessage(ch chan<- events.OrderMessageEve
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// SubscribeOrderMessage indicates an expected call of SubscribeOrderMessage
|
|
|
|
|
// SubscribeOrderMessage indicates an expected call of SubscribeOrderMessage.
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) SubscribeOrderMessage(ch interface{}) *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeOrderMessage", reflect.TypeOf((*MockPeerManager)(nil).SubscribeOrderMessage), ch)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AddNode mocks base method
|
|
|
|
|
func (m *MockPeerManager) AddNode(newNodeID uint64, vpInfo *pb.VpInfo) {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
m.ctrl.Call(m, "AddNode", newNodeID, vpInfo)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AddNode indicates an expected call of AddNode
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) AddNode(newNodeID, vpInfo interface{}) *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNode", reflect.TypeOf((*MockPeerManager)(nil).AddNode), newNodeID, vpInfo)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DelNode mocks base method
|
|
|
|
|
func (m *MockPeerManager) DelNode(delID uint64) {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
m.ctrl.Call(m, "DelNode", delID)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DelNode indicates an expected call of DelNode
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) DelNode(delID interface{}) *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelNode", reflect.TypeOf((*MockPeerManager)(nil).DelNode), delID)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UpdateRouter mocks base method
|
|
|
|
|
// UpdateRouter mocks base method.
|
|
|
|
|
func (m *MockPeerManager) UpdateRouter(vpInfos map[uint64]*pb.VpInfo, isNew bool) bool {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "UpdateRouter", vpInfos, isNew)
|
|
|
|
@ -212,76 +238,36 @@ func (m *MockPeerManager) UpdateRouter(vpInfos map[uint64]*pb.VpInfo, isNew bool
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UpdateRouter indicates an expected call of UpdateRouter
|
|
|
|
|
// UpdateRouter indicates an expected call of UpdateRouter.
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) UpdateRouter(vpInfos, isNew interface{}) *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRouter", reflect.TypeOf((*MockPeerManager)(nil).UpdateRouter), vpInfos, isNew)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Disconnect mocks base method
|
|
|
|
|
func (m *MockPeerManager) Disconnect(vpInfos map[uint64]*pb.VpInfo) {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
m.ctrl.Call(m, "Disconnect", vpInfos)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Disconnect indicates an expected call of Disconnect
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) Disconnect(vpInfos interface{}) *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Disconnect", reflect.TypeOf((*MockPeerManager)(nil).Disconnect), vpInfos)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// PierManager mocks base method
|
|
|
|
|
func (m *MockPeerManager) PierManager() peermgr.PierManager {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "PierManager")
|
|
|
|
|
ret0, _ := ret[0].(peermgr.PierManager)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// PierManager indicates an expected call of PierManager
|
|
|
|
|
func (mr *MockPeerManagerMockRecorder) PierManager() *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PierManager", reflect.TypeOf((*MockPeerManager)(nil).PierManager))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MockPierManager is a mock of PierManager interface
|
|
|
|
|
// MockPierManager is a mock of PierManager interface.
|
|
|
|
|
type MockPierManager struct {
|
|
|
|
|
ctrl *gomock.Controller
|
|
|
|
|
recorder *MockPierManagerMockRecorder
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MockPierManagerMockRecorder is the mock recorder for MockPierManager
|
|
|
|
|
// MockPierManagerMockRecorder is the mock recorder for MockPierManager.
|
|
|
|
|
type MockPierManagerMockRecorder struct {
|
|
|
|
|
mock *MockPierManager
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewMockPierManager creates a new mock instance
|
|
|
|
|
// NewMockPierManager creates a new mock instance.
|
|
|
|
|
func NewMockPierManager(ctrl *gomock.Controller) *MockPierManager {
|
|
|
|
|
mock := &MockPierManager{ctrl: ctrl}
|
|
|
|
|
mock.recorder = &MockPierManagerMockRecorder{mock}
|
|
|
|
|
return mock
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use
|
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
|
|
|
func (m *MockPierManager) EXPECT() *MockPierManagerMockRecorder {
|
|
|
|
|
return m.recorder
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Piers mocks base method
|
|
|
|
|
func (m *MockPierManager) Piers() *peermgr.Piers {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "Piers")
|
|
|
|
|
ret0, _ := ret[0].(*peermgr.Piers)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Piers indicates an expected call of Piers
|
|
|
|
|
func (mr *MockPierManagerMockRecorder) Piers() *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Piers", reflect.TypeOf((*MockPierManager)(nil).Piers))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AskPierMaster mocks base method
|
|
|
|
|
// AskPierMaster mocks base method.
|
|
|
|
|
func (m *MockPierManager) AskPierMaster(arg0 string) (bool, error) {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "AskPierMaster", arg0)
|
|
|
|
@ -290,8 +276,22 @@ func (m *MockPierManager) AskPierMaster(arg0 string) (bool, error) {
|
|
|
|
|
return ret0, ret1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AskPierMaster indicates an expected call of AskPierMaster
|
|
|
|
|
// AskPierMaster indicates an expected call of AskPierMaster.
|
|
|
|
|
func (mr *MockPierManagerMockRecorder) AskPierMaster(arg0 interface{}) *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AskPierMaster", reflect.TypeOf((*MockPierManager)(nil).AskPierMaster), arg0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Piers mocks base method.
|
|
|
|
|
func (m *MockPierManager) Piers() *peermgr.Piers {
|
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
|
ret := m.ctrl.Call(m, "Piers")
|
|
|
|
|
ret0, _ := ret[0].(*peermgr.Piers)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Piers indicates an expected call of Piers.
|
|
|
|
|
func (mr *MockPierManagerMockRecorder) Piers() *gomock.Call {
|
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Piers", reflect.TypeOf((*MockPierManager)(nil).Piers))
|
|
|
|
|
}
|
|
|
|
|