github.com/klaytn/klaytn@v1.12.1/node/cn/peer_set_mock_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/klaytn/klaytn/node/cn (interfaces: PeerSet) 3 4 // Package cn is a generated GoMock package. 5 package cn 6 7 import ( 8 reflect "reflect" 9 10 gomock "github.com/golang/mock/gomock" 11 types "github.com/klaytn/klaytn/blockchain/types" 12 common "github.com/klaytn/klaytn/common" 13 p2p "github.com/klaytn/klaytn/networks/p2p" 14 snap "github.com/klaytn/klaytn/node/cn/snap" 15 ) 16 17 // MockPeerSet is a mock of PeerSet interface 18 type MockPeerSet struct { 19 ctrl *gomock.Controller 20 recorder *MockPeerSetMockRecorder 21 } 22 23 // MockPeerSetMockRecorder is the mock recorder for MockPeerSet 24 type MockPeerSetMockRecorder struct { 25 mock *MockPeerSet 26 } 27 28 // NewMockPeerSet creates a new mock instance 29 func NewMockPeerSet(ctrl *gomock.Controller) *MockPeerSet { 30 mock := &MockPeerSet{ctrl: ctrl} 31 mock.recorder = &MockPeerSetMockRecorder{mock} 32 return mock 33 } 34 35 // EXPECT returns an object that allows the caller to indicate expected use 36 func (m *MockPeerSet) EXPECT() *MockPeerSetMockRecorder { 37 return m.recorder 38 } 39 40 // BestPeer mocks base method 41 func (m *MockPeerSet) BestPeer() Peer { 42 m.ctrl.T.Helper() 43 ret := m.ctrl.Call(m, "BestPeer") 44 ret0, _ := ret[0].(Peer) 45 return ret0 46 } 47 48 // BestPeer indicates an expected call of BestPeer 49 func (mr *MockPeerSetMockRecorder) BestPeer() *gomock.Call { 50 mr.mock.ctrl.T.Helper() 51 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestPeer", reflect.TypeOf((*MockPeerSet)(nil).BestPeer)) 52 } 53 54 // CNPeers mocks base method 55 func (m *MockPeerSet) CNPeers() map[common.Address]Peer { 56 m.ctrl.T.Helper() 57 ret := m.ctrl.Call(m, "CNPeers") 58 ret0, _ := ret[0].(map[common.Address]Peer) 59 return ret0 60 } 61 62 // CNPeers indicates an expected call of CNPeers 63 func (mr *MockPeerSetMockRecorder) CNPeers() *gomock.Call { 64 mr.mock.ctrl.T.Helper() 65 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CNPeers", reflect.TypeOf((*MockPeerSet)(nil).CNPeers)) 66 } 67 68 // CNWithoutTx mocks base method 69 func (m *MockPeerSet) CNWithoutTx(arg0 common.Hash) []Peer { 70 m.ctrl.T.Helper() 71 ret := m.ctrl.Call(m, "CNWithoutTx", arg0) 72 ret0, _ := ret[0].([]Peer) 73 return ret0 74 } 75 76 // CNWithoutTx indicates an expected call of CNWithoutTx 77 func (mr *MockPeerSetMockRecorder) CNWithoutTx(arg0 interface{}) *gomock.Call { 78 mr.mock.ctrl.T.Helper() 79 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CNWithoutTx", reflect.TypeOf((*MockPeerSet)(nil).CNWithoutTx), arg0) 80 } 81 82 // Close mocks base method 83 func (m *MockPeerSet) Close() { 84 m.ctrl.T.Helper() 85 m.ctrl.Call(m, "Close") 86 } 87 88 // Close indicates an expected call of Close 89 func (mr *MockPeerSetMockRecorder) Close() *gomock.Call { 90 mr.mock.ctrl.T.Helper() 91 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockPeerSet)(nil).Close)) 92 } 93 94 // ENPeers mocks base method 95 func (m *MockPeerSet) ENPeers() map[common.Address]Peer { 96 m.ctrl.T.Helper() 97 ret := m.ctrl.Call(m, "ENPeers") 98 ret0, _ := ret[0].(map[common.Address]Peer) 99 return ret0 100 } 101 102 // ENPeers indicates an expected call of ENPeers 103 func (mr *MockPeerSetMockRecorder) ENPeers() *gomock.Call { 104 mr.mock.ctrl.T.Helper() 105 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ENPeers", reflect.TypeOf((*MockPeerSet)(nil).ENPeers)) 106 } 107 108 // Len mocks base method 109 func (m *MockPeerSet) Len() int { 110 m.ctrl.T.Helper() 111 ret := m.ctrl.Call(m, "Len") 112 ret0, _ := ret[0].(int) 113 return ret0 114 } 115 116 // Len indicates an expected call of Len 117 func (mr *MockPeerSetMockRecorder) Len() *gomock.Call { 118 mr.mock.ctrl.T.Helper() 119 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Len", reflect.TypeOf((*MockPeerSet)(nil).Len)) 120 } 121 122 // PNPeers mocks base method 123 func (m *MockPeerSet) PNPeers() map[common.Address]Peer { 124 m.ctrl.T.Helper() 125 ret := m.ctrl.Call(m, "PNPeers") 126 ret0, _ := ret[0].(map[common.Address]Peer) 127 return ret0 128 } 129 130 // PNPeers indicates an expected call of PNPeers 131 func (mr *MockPeerSetMockRecorder) PNPeers() *gomock.Call { 132 mr.mock.ctrl.T.Helper() 133 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PNPeers", reflect.TypeOf((*MockPeerSet)(nil).PNPeers)) 134 } 135 136 // Peer mocks base method 137 func (m *MockPeerSet) Peer(arg0 string) Peer { 138 m.ctrl.T.Helper() 139 ret := m.ctrl.Call(m, "Peer", arg0) 140 ret0, _ := ret[0].(Peer) 141 return ret0 142 } 143 144 // Peer indicates an expected call of Peer 145 func (mr *MockPeerSetMockRecorder) Peer(arg0 interface{}) *gomock.Call { 146 mr.mock.ctrl.T.Helper() 147 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Peer", reflect.TypeOf((*MockPeerSet)(nil).Peer), arg0) 148 } 149 150 // Peers mocks base method 151 func (m *MockPeerSet) Peers() map[string]Peer { 152 m.ctrl.T.Helper() 153 ret := m.ctrl.Call(m, "Peers") 154 ret0, _ := ret[0].(map[string]Peer) 155 return ret0 156 } 157 158 // Peers indicates an expected call of Peers 159 func (mr *MockPeerSetMockRecorder) Peers() *gomock.Call { 160 mr.mock.ctrl.T.Helper() 161 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Peers", reflect.TypeOf((*MockPeerSet)(nil).Peers)) 162 } 163 164 // PeersWithoutBlock mocks base method 165 func (m *MockPeerSet) PeersWithoutBlock(arg0 common.Hash) []Peer { 166 m.ctrl.T.Helper() 167 ret := m.ctrl.Call(m, "PeersWithoutBlock", arg0) 168 ret0, _ := ret[0].([]Peer) 169 return ret0 170 } 171 172 // PeersWithoutBlock indicates an expected call of PeersWithoutBlock 173 func (mr *MockPeerSetMockRecorder) PeersWithoutBlock(arg0 interface{}) *gomock.Call { 174 mr.mock.ctrl.T.Helper() 175 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeersWithoutBlock", reflect.TypeOf((*MockPeerSet)(nil).PeersWithoutBlock), arg0) 176 } 177 178 // PeersWithoutTx mocks base method 179 func (m *MockPeerSet) PeersWithoutTx(arg0 common.Hash) []Peer { 180 m.ctrl.T.Helper() 181 ret := m.ctrl.Call(m, "PeersWithoutTx", arg0) 182 ret0, _ := ret[0].([]Peer) 183 return ret0 184 } 185 186 // PeersWithoutTx indicates an expected call of PeersWithoutTx 187 func (mr *MockPeerSetMockRecorder) PeersWithoutTx(arg0 interface{}) *gomock.Call { 188 mr.mock.ctrl.T.Helper() 189 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeersWithoutTx", reflect.TypeOf((*MockPeerSet)(nil).PeersWithoutTx), arg0) 190 } 191 192 // Register mocks base method 193 func (m *MockPeerSet) Register(arg0 Peer, arg1 *snap.Peer) error { 194 m.ctrl.T.Helper() 195 ret := m.ctrl.Call(m, "Register", arg0, arg1) 196 ret0, _ := ret[0].(error) 197 return ret0 198 } 199 200 // Register indicates an expected call of Register 201 func (mr *MockPeerSetMockRecorder) Register(arg0, arg1 interface{}) *gomock.Call { 202 mr.mock.ctrl.T.Helper() 203 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockPeerSet)(nil).Register), arg0, arg1) 204 } 205 206 // RegisterSnapExtension mocks base method 207 func (m *MockPeerSet) RegisterSnapExtension(arg0 *snap.Peer) error { 208 m.ctrl.T.Helper() 209 ret := m.ctrl.Call(m, "RegisterSnapExtension", arg0) 210 ret0, _ := ret[0].(error) 211 return ret0 212 } 213 214 // RegisterSnapExtension indicates an expected call of RegisterSnapExtension 215 func (mr *MockPeerSetMockRecorder) RegisterSnapExtension(arg0 interface{}) *gomock.Call { 216 mr.mock.ctrl.T.Helper() 217 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterSnapExtension", reflect.TypeOf((*MockPeerSet)(nil).RegisterSnapExtension), arg0) 218 } 219 220 // RegisterValidator mocks base method 221 func (m *MockPeerSet) RegisterValidator(arg0 common.ConnType, arg1 p2p.PeerTypeValidator) { 222 m.ctrl.T.Helper() 223 m.ctrl.Call(m, "RegisterValidator", arg0, arg1) 224 } 225 226 // RegisterValidator indicates an expected call of RegisterValidator 227 func (mr *MockPeerSetMockRecorder) RegisterValidator(arg0, arg1 interface{}) *gomock.Call { 228 mr.mock.ctrl.T.Helper() 229 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterValidator", reflect.TypeOf((*MockPeerSet)(nil).RegisterValidator), arg0, arg1) 230 } 231 232 // SamplePeersToSendBlock mocks base method 233 func (m *MockPeerSet) SamplePeersToSendBlock(arg0 *types.Block, arg1 common.ConnType) []Peer { 234 m.ctrl.T.Helper() 235 ret := m.ctrl.Call(m, "SamplePeersToSendBlock", arg0, arg1) 236 ret0, _ := ret[0].([]Peer) 237 return ret0 238 } 239 240 // SamplePeersToSendBlock indicates an expected call of SamplePeersToSendBlock 241 func (mr *MockPeerSetMockRecorder) SamplePeersToSendBlock(arg0, arg1 interface{}) *gomock.Call { 242 mr.mock.ctrl.T.Helper() 243 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SamplePeersToSendBlock", reflect.TypeOf((*MockPeerSet)(nil).SamplePeersToSendBlock), arg0, arg1) 244 } 245 246 // SampleResendPeersByType mocks base method 247 func (m *MockPeerSet) SampleResendPeersByType(arg0 common.ConnType) []Peer { 248 m.ctrl.T.Helper() 249 ret := m.ctrl.Call(m, "SampleResendPeersByType", arg0) 250 ret0, _ := ret[0].([]Peer) 251 return ret0 252 } 253 254 // SampleResendPeersByType indicates an expected call of SampleResendPeersByType 255 func (mr *MockPeerSetMockRecorder) SampleResendPeersByType(arg0 interface{}) *gomock.Call { 256 mr.mock.ctrl.T.Helper() 257 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SampleResendPeersByType", reflect.TypeOf((*MockPeerSet)(nil).SampleResendPeersByType), arg0) 258 } 259 260 // SnapLen mocks base method 261 func (m *MockPeerSet) SnapLen() int { 262 m.ctrl.T.Helper() 263 ret := m.ctrl.Call(m, "SnapLen") 264 ret0, _ := ret[0].(int) 265 return ret0 266 } 267 268 // SnapLen indicates an expected call of SnapLen 269 func (mr *MockPeerSetMockRecorder) SnapLen() *gomock.Call { 270 mr.mock.ctrl.T.Helper() 271 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SnapLen", reflect.TypeOf((*MockPeerSet)(nil).SnapLen)) 272 } 273 274 // TypePeersWithoutTx mocks base method 275 func (m *MockPeerSet) TypePeersWithoutTx(arg0 common.Hash, arg1 common.ConnType) []Peer { 276 m.ctrl.T.Helper() 277 ret := m.ctrl.Call(m, "TypePeersWithoutTx", arg0, arg1) 278 ret0, _ := ret[0].([]Peer) 279 return ret0 280 } 281 282 // TypePeersWithoutTx indicates an expected call of TypePeersWithoutTx 283 func (mr *MockPeerSetMockRecorder) TypePeersWithoutTx(arg0, arg1 interface{}) *gomock.Call { 284 mr.mock.ctrl.T.Helper() 285 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TypePeersWithoutTx", reflect.TypeOf((*MockPeerSet)(nil).TypePeersWithoutTx), arg0, arg1) 286 } 287 288 // Unregister mocks base method 289 func (m *MockPeerSet) Unregister(arg0 string) error { 290 m.ctrl.T.Helper() 291 ret := m.ctrl.Call(m, "Unregister", arg0) 292 ret0, _ := ret[0].(error) 293 return ret0 294 } 295 296 // Unregister indicates an expected call of Unregister 297 func (mr *MockPeerSetMockRecorder) Unregister(arg0 interface{}) *gomock.Call { 298 mr.mock.ctrl.T.Helper() 299 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unregister", reflect.TypeOf((*MockPeerSet)(nil).Unregister), arg0) 300 } 301 302 // UpdateTypePeersWithoutTxs mocks base method 303 func (m *MockPeerSet) UpdateTypePeersWithoutTxs(arg0 *types.Transaction, arg1 common.ConnType, arg2 map[Peer]types.Transactions) { 304 m.ctrl.T.Helper() 305 m.ctrl.Call(m, "UpdateTypePeersWithoutTxs", arg0, arg1, arg2) 306 } 307 308 // UpdateTypePeersWithoutTxs indicates an expected call of UpdateTypePeersWithoutTxs 309 func (mr *MockPeerSetMockRecorder) UpdateTypePeersWithoutTxs(arg0, arg1, arg2 interface{}) *gomock.Call { 310 mr.mock.ctrl.T.Helper() 311 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateTypePeersWithoutTxs", reflect.TypeOf((*MockPeerSet)(nil).UpdateTypePeersWithoutTxs), arg0, arg1, arg2) 312 } 313 314 // WaitSnapExtension mocks base method 315 func (m *MockPeerSet) WaitSnapExtension(arg0 Peer) (*snap.Peer, error) { 316 m.ctrl.T.Helper() 317 ret := m.ctrl.Call(m, "WaitSnapExtension", arg0) 318 ret0, _ := ret[0].(*snap.Peer) 319 ret1, _ := ret[1].(error) 320 return ret0, ret1 321 } 322 323 // WaitSnapExtension indicates an expected call of WaitSnapExtension 324 func (mr *MockPeerSetMockRecorder) WaitSnapExtension(arg0 interface{}) *gomock.Call { 325 mr.mock.ctrl.T.Helper() 326 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitSnapExtension", reflect.TypeOf((*MockPeerSet)(nil).WaitSnapExtension), arg0) 327 }