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