github.com/klaytn/klaytn@v1.12.1/node/sc/bridgepeer_mock_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/klaytn/klaytn/node/sc (interfaces: BridgePeer) 3 4 // Package sc is a generated GoMock package. 5 package sc 6 7 import ( 8 big "math/big" 9 reflect "reflect" 10 11 gomock "github.com/golang/mock/gomock" 12 types "github.com/klaytn/klaytn/blockchain/types" 13 common "github.com/klaytn/klaytn/common" 14 p2p "github.com/klaytn/klaytn/networks/p2p" 15 discover "github.com/klaytn/klaytn/networks/p2p/discover" 16 ) 17 18 // MockBridgePeer is a mock of BridgePeer interface. 19 type MockBridgePeer struct { 20 ctrl *gomock.Controller 21 recorder *MockBridgePeerMockRecorder 22 } 23 24 // MockBridgePeerMockRecorder is the mock recorder for MockBridgePeer. 25 type MockBridgePeerMockRecorder struct { 26 mock *MockBridgePeer 27 } 28 29 // NewMockBridgePeer creates a new mock instance. 30 func NewMockBridgePeer(ctrl *gomock.Controller) *MockBridgePeer { 31 mock := &MockBridgePeer{ctrl: ctrl} 32 mock.recorder = &MockBridgePeerMockRecorder{mock} 33 return mock 34 } 35 36 // EXPECT returns an object that allows the caller to indicate expected use. 37 func (m *MockBridgePeer) EXPECT() *MockBridgePeerMockRecorder { 38 return m.recorder 39 } 40 41 // AddToKnownTxs mocks base method. 42 func (m *MockBridgePeer) AddToKnownTxs(arg0 common.Hash) { 43 m.ctrl.T.Helper() 44 m.ctrl.Call(m, "AddToKnownTxs", arg0) 45 } 46 47 // AddToKnownTxs indicates an expected call of AddToKnownTxs. 48 func (mr *MockBridgePeerMockRecorder) AddToKnownTxs(arg0 interface{}) *gomock.Call { 49 mr.mock.ctrl.T.Helper() 50 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddToKnownTxs", reflect.TypeOf((*MockBridgePeer)(nil).AddToKnownTxs), arg0) 51 } 52 53 // Close mocks base method. 54 func (m *MockBridgePeer) Close() { 55 m.ctrl.T.Helper() 56 m.ctrl.Call(m, "Close") 57 } 58 59 // Close indicates an expected call of Close. 60 func (mr *MockBridgePeerMockRecorder) Close() *gomock.Call { 61 mr.mock.ctrl.T.Helper() 62 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockBridgePeer)(nil).Close)) 63 } 64 65 // ConnType mocks base method. 66 func (m *MockBridgePeer) ConnType() common.ConnType { 67 m.ctrl.T.Helper() 68 ret := m.ctrl.Call(m, "ConnType") 69 ret0, _ := ret[0].(common.ConnType) 70 return ret0 71 } 72 73 // ConnType indicates an expected call of ConnType. 74 func (mr *MockBridgePeerMockRecorder) ConnType() *gomock.Call { 75 mr.mock.ctrl.T.Helper() 76 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnType", reflect.TypeOf((*MockBridgePeer)(nil).ConnType)) 77 } 78 79 // GetAddr mocks base method. 80 func (m *MockBridgePeer) GetAddr() common.Address { 81 m.ctrl.T.Helper() 82 ret := m.ctrl.Call(m, "GetAddr") 83 ret0, _ := ret[0].(common.Address) 84 return ret0 85 } 86 87 // GetAddr indicates an expected call of GetAddr. 88 func (mr *MockBridgePeerMockRecorder) GetAddr() *gomock.Call { 89 mr.mock.ctrl.T.Helper() 90 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAddr", reflect.TypeOf((*MockBridgePeer)(nil).GetAddr)) 91 } 92 93 // GetChainID mocks base method. 94 func (m *MockBridgePeer) GetChainID() *big.Int { 95 m.ctrl.T.Helper() 96 ret := m.ctrl.Call(m, "GetChainID") 97 ret0, _ := ret[0].(*big.Int) 98 return ret0 99 } 100 101 // GetChainID indicates an expected call of GetChainID. 102 func (mr *MockBridgePeerMockRecorder) GetChainID() *gomock.Call { 103 mr.mock.ctrl.T.Helper() 104 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChainID", reflect.TypeOf((*MockBridgePeer)(nil).GetChainID)) 105 } 106 107 // GetID mocks base method. 108 func (m *MockBridgePeer) GetID() string { 109 m.ctrl.T.Helper() 110 ret := m.ctrl.Call(m, "GetID") 111 ret0, _ := ret[0].(string) 112 return ret0 113 } 114 115 // GetID indicates an expected call of GetID. 116 func (mr *MockBridgePeerMockRecorder) GetID() *gomock.Call { 117 mr.mock.ctrl.T.Helper() 118 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetID", reflect.TypeOf((*MockBridgePeer)(nil).GetID)) 119 } 120 121 // GetP2PPeer mocks base method. 122 func (m *MockBridgePeer) GetP2PPeer() *p2p.Peer { 123 m.ctrl.T.Helper() 124 ret := m.ctrl.Call(m, "GetP2PPeer") 125 ret0, _ := ret[0].(*p2p.Peer) 126 return ret0 127 } 128 129 // GetP2PPeer indicates an expected call of GetP2PPeer. 130 func (mr *MockBridgePeerMockRecorder) GetP2PPeer() *gomock.Call { 131 mr.mock.ctrl.T.Helper() 132 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetP2PPeer", reflect.TypeOf((*MockBridgePeer)(nil).GetP2PPeer)) 133 } 134 135 // GetP2PPeerID mocks base method. 136 func (m *MockBridgePeer) GetP2PPeerID() discover.NodeID { 137 m.ctrl.T.Helper() 138 ret := m.ctrl.Call(m, "GetP2PPeerID") 139 ret0, _ := ret[0].(discover.NodeID) 140 return ret0 141 } 142 143 // GetP2PPeerID indicates an expected call of GetP2PPeerID. 144 func (mr *MockBridgePeerMockRecorder) GetP2PPeerID() *gomock.Call { 145 mr.mock.ctrl.T.Helper() 146 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetP2PPeerID", reflect.TypeOf((*MockBridgePeer)(nil).GetP2PPeerID)) 147 } 148 149 // GetRW mocks base method. 150 func (m *MockBridgePeer) GetRW() p2p.MsgReadWriter { 151 m.ctrl.T.Helper() 152 ret := m.ctrl.Call(m, "GetRW") 153 ret0, _ := ret[0].(p2p.MsgReadWriter) 154 return ret0 155 } 156 157 // GetRW indicates an expected call of GetRW. 158 func (mr *MockBridgePeerMockRecorder) GetRW() *gomock.Call { 159 mr.mock.ctrl.T.Helper() 160 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRW", reflect.TypeOf((*MockBridgePeer)(nil).GetRW)) 161 } 162 163 // GetVersion mocks base method. 164 func (m *MockBridgePeer) GetVersion() int { 165 m.ctrl.T.Helper() 166 ret := m.ctrl.Call(m, "GetVersion") 167 ret0, _ := ret[0].(int) 168 return ret0 169 } 170 171 // GetVersion indicates an expected call of GetVersion. 172 func (mr *MockBridgePeerMockRecorder) GetVersion() *gomock.Call { 173 mr.mock.ctrl.T.Helper() 174 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVersion", reflect.TypeOf((*MockBridgePeer)(nil).GetVersion)) 175 } 176 177 // Handle mocks base method. 178 func (m *MockBridgePeer) Handle(arg0 *MainBridge) error { 179 m.ctrl.T.Helper() 180 ret := m.ctrl.Call(m, "Handle", arg0) 181 ret0, _ := ret[0].(error) 182 return ret0 183 } 184 185 // Handle indicates an expected call of Handle. 186 func (mr *MockBridgePeerMockRecorder) Handle(arg0 interface{}) *gomock.Call { 187 mr.mock.ctrl.T.Helper() 188 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Handle", reflect.TypeOf((*MockBridgePeer)(nil).Handle), arg0) 189 } 190 191 // Handshake mocks base method. 192 func (m *MockBridgePeer) Handshake(arg0 uint64, arg1, arg2 *big.Int, arg3 common.Hash) error { 193 m.ctrl.T.Helper() 194 ret := m.ctrl.Call(m, "Handshake", arg0, arg1, arg2, arg3) 195 ret0, _ := ret[0].(error) 196 return ret0 197 } 198 199 // Handshake indicates an expected call of Handshake. 200 func (mr *MockBridgePeerMockRecorder) Handshake(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { 201 mr.mock.ctrl.T.Helper() 202 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Handshake", reflect.TypeOf((*MockBridgePeer)(nil).Handshake), arg0, arg1, arg2, arg3) 203 } 204 205 // Head mocks base method. 206 func (m *MockBridgePeer) Head() (common.Hash, *big.Int) { 207 m.ctrl.T.Helper() 208 ret := m.ctrl.Call(m, "Head") 209 ret0, _ := ret[0].(common.Hash) 210 ret1, _ := ret[1].(*big.Int) 211 return ret0, ret1 212 } 213 214 // Head indicates an expected call of Head. 215 func (mr *MockBridgePeerMockRecorder) Head() *gomock.Call { 216 mr.mock.ctrl.T.Helper() 217 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Head", reflect.TypeOf((*MockBridgePeer)(nil).Head)) 218 } 219 220 // Info mocks base method. 221 func (m *MockBridgePeer) Info() *BridgePeerInfo { 222 m.ctrl.T.Helper() 223 ret := m.ctrl.Call(m, "Info") 224 ret0, _ := ret[0].(*BridgePeerInfo) 225 return ret0 226 } 227 228 // Info indicates an expected call of Info. 229 func (mr *MockBridgePeerMockRecorder) Info() *gomock.Call { 230 mr.mock.ctrl.T.Helper() 231 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Info", reflect.TypeOf((*MockBridgePeer)(nil).Info)) 232 } 233 234 // KnowsTx mocks base method. 235 func (m *MockBridgePeer) KnowsTx(arg0 common.Hash) bool { 236 m.ctrl.T.Helper() 237 ret := m.ctrl.Call(m, "KnowsTx", arg0) 238 ret0, _ := ret[0].(bool) 239 return ret0 240 } 241 242 // KnowsTx indicates an expected call of KnowsTx. 243 func (mr *MockBridgePeerMockRecorder) KnowsTx(arg0 interface{}) *gomock.Call { 244 mr.mock.ctrl.T.Helper() 245 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KnowsTx", reflect.TypeOf((*MockBridgePeer)(nil).KnowsTx), arg0) 246 } 247 248 // Send mocks base method. 249 func (m *MockBridgePeer) Send(arg0 uint64, arg1 interface{}) error { 250 m.ctrl.T.Helper() 251 ret := m.ctrl.Call(m, "Send", arg0, arg1) 252 ret0, _ := ret[0].(error) 253 return ret0 254 } 255 256 // Send indicates an expected call of Send. 257 func (mr *MockBridgePeerMockRecorder) Send(arg0, arg1 interface{}) *gomock.Call { 258 mr.mock.ctrl.T.Helper() 259 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockBridgePeer)(nil).Send), arg0, arg1) 260 } 261 262 // SendRequestRPC mocks base method. 263 func (m *MockBridgePeer) SendRequestRPC(arg0 []byte) error { 264 m.ctrl.T.Helper() 265 ret := m.ctrl.Call(m, "SendRequestRPC", arg0) 266 ret0, _ := ret[0].(error) 267 return ret0 268 } 269 270 // SendRequestRPC indicates an expected call of SendRequestRPC. 271 func (mr *MockBridgePeerMockRecorder) SendRequestRPC(arg0 interface{}) *gomock.Call { 272 mr.mock.ctrl.T.Helper() 273 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendRequestRPC", reflect.TypeOf((*MockBridgePeer)(nil).SendRequestRPC), arg0) 274 } 275 276 // SendResponseRPC mocks base method. 277 func (m *MockBridgePeer) SendResponseRPC(arg0 []byte) error { 278 m.ctrl.T.Helper() 279 ret := m.ctrl.Call(m, "SendResponseRPC", arg0) 280 ret0, _ := ret[0].(error) 281 return ret0 282 } 283 284 // SendResponseRPC indicates an expected call of SendResponseRPC. 285 func (mr *MockBridgePeerMockRecorder) SendResponseRPC(arg0 interface{}) *gomock.Call { 286 mr.mock.ctrl.T.Helper() 287 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendResponseRPC", reflect.TypeOf((*MockBridgePeer)(nil).SendResponseRPC), arg0) 288 } 289 290 // SendServiceChainInfoRequest mocks base method. 291 func (m *MockBridgePeer) SendServiceChainInfoRequest(arg0 *common.Address) error { 292 m.ctrl.T.Helper() 293 ret := m.ctrl.Call(m, "SendServiceChainInfoRequest", arg0) 294 ret0, _ := ret[0].(error) 295 return ret0 296 } 297 298 // SendServiceChainInfoRequest indicates an expected call of SendServiceChainInfoRequest. 299 func (mr *MockBridgePeerMockRecorder) SendServiceChainInfoRequest(arg0 interface{}) *gomock.Call { 300 mr.mock.ctrl.T.Helper() 301 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendServiceChainInfoRequest", reflect.TypeOf((*MockBridgePeer)(nil).SendServiceChainInfoRequest), arg0) 302 } 303 304 // SendServiceChainInfoResponse mocks base method. 305 func (m *MockBridgePeer) SendServiceChainInfoResponse(arg0 *parentChainInfo) error { 306 m.ctrl.T.Helper() 307 ret := m.ctrl.Call(m, "SendServiceChainInfoResponse", arg0) 308 ret0, _ := ret[0].(error) 309 return ret0 310 } 311 312 // SendServiceChainInfoResponse indicates an expected call of SendServiceChainInfoResponse. 313 func (mr *MockBridgePeerMockRecorder) SendServiceChainInfoResponse(arg0 interface{}) *gomock.Call { 314 mr.mock.ctrl.T.Helper() 315 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendServiceChainInfoResponse", reflect.TypeOf((*MockBridgePeer)(nil).SendServiceChainInfoResponse), arg0) 316 } 317 318 // SendServiceChainInvalidTxResponse mocks base method. 319 func (m *MockBridgePeer) SendServiceChainInvalidTxResponse(arg0 []InvalidParentChainTx) error { 320 m.ctrl.T.Helper() 321 ret := m.ctrl.Call(m, "SendServiceChainInvalidTxResponse", arg0) 322 ret0, _ := ret[0].(error) 323 return ret0 324 } 325 326 // SendServiceChainInvalidTxResponse indicates an expected call of SendServiceChainInvalidTxResponse. 327 func (mr *MockBridgePeerMockRecorder) SendServiceChainInvalidTxResponse(arg0 interface{}) *gomock.Call { 328 mr.mock.ctrl.T.Helper() 329 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendServiceChainInvalidTxResponse", reflect.TypeOf((*MockBridgePeer)(nil).SendServiceChainInvalidTxResponse), arg0) 330 } 331 332 // SendServiceChainReceiptRequest mocks base method. 333 func (m *MockBridgePeer) SendServiceChainReceiptRequest(arg0 []common.Hash) error { 334 m.ctrl.T.Helper() 335 ret := m.ctrl.Call(m, "SendServiceChainReceiptRequest", arg0) 336 ret0, _ := ret[0].(error) 337 return ret0 338 } 339 340 // SendServiceChainReceiptRequest indicates an expected call of SendServiceChainReceiptRequest. 341 func (mr *MockBridgePeerMockRecorder) SendServiceChainReceiptRequest(arg0 interface{}) *gomock.Call { 342 mr.mock.ctrl.T.Helper() 343 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendServiceChainReceiptRequest", reflect.TypeOf((*MockBridgePeer)(nil).SendServiceChainReceiptRequest), arg0) 344 } 345 346 // SendServiceChainReceiptResponse mocks base method. 347 func (m *MockBridgePeer) SendServiceChainReceiptResponse(arg0 []*types.ReceiptForStorage) error { 348 m.ctrl.T.Helper() 349 ret := m.ctrl.Call(m, "SendServiceChainReceiptResponse", arg0) 350 ret0, _ := ret[0].(error) 351 return ret0 352 } 353 354 // SendServiceChainReceiptResponse indicates an expected call of SendServiceChainReceiptResponse. 355 func (mr *MockBridgePeerMockRecorder) SendServiceChainReceiptResponse(arg0 interface{}) *gomock.Call { 356 mr.mock.ctrl.T.Helper() 357 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendServiceChainReceiptResponse", reflect.TypeOf((*MockBridgePeer)(nil).SendServiceChainReceiptResponse), arg0) 358 } 359 360 // SendServiceChainTxs mocks base method. 361 func (m *MockBridgePeer) SendServiceChainTxs(arg0 types.Transactions) error { 362 m.ctrl.T.Helper() 363 ret := m.ctrl.Call(m, "SendServiceChainTxs", arg0) 364 ret0, _ := ret[0].(error) 365 return ret0 366 } 367 368 // SendServiceChainTxs indicates an expected call of SendServiceChainTxs. 369 func (mr *MockBridgePeerMockRecorder) SendServiceChainTxs(arg0 interface{}) *gomock.Call { 370 mr.mock.ctrl.T.Helper() 371 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendServiceChainTxs", reflect.TypeOf((*MockBridgePeer)(nil).SendServiceChainTxs), arg0) 372 } 373 374 // SetAddr mocks base method. 375 func (m *MockBridgePeer) SetAddr(arg0 common.Address) { 376 m.ctrl.T.Helper() 377 m.ctrl.Call(m, "SetAddr", arg0) 378 } 379 380 // SetAddr indicates an expected call of SetAddr. 381 func (mr *MockBridgePeerMockRecorder) SetAddr(arg0 interface{}) *gomock.Call { 382 mr.mock.ctrl.T.Helper() 383 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAddr", reflect.TypeOf((*MockBridgePeer)(nil).SetAddr), arg0) 384 }