github.com/klaytn/klaytn@v1.12.1/node/cn/mocks/downloader_mock.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/klaytn/klaytn/node/cn (interfaces: ProtocolManagerDownloader) 3 4 // Package mocks is a generated GoMock package. 5 package mocks 6 7 import ( 8 big "math/big" 9 reflect "reflect" 10 11 gomock "github.com/golang/mock/gomock" 12 klaytn "github.com/klaytn/klaytn" 13 types "github.com/klaytn/klaytn/blockchain/types" 14 common "github.com/klaytn/klaytn/common" 15 downloader "github.com/klaytn/klaytn/datasync/downloader" 16 snap "github.com/klaytn/klaytn/node/cn/snap" 17 reward "github.com/klaytn/klaytn/reward" 18 ) 19 20 // MockProtocolManagerDownloader is a mock of ProtocolManagerDownloader interface. 21 type MockProtocolManagerDownloader struct { 22 ctrl *gomock.Controller 23 recorder *MockProtocolManagerDownloaderMockRecorder 24 } 25 26 // MockProtocolManagerDownloaderMockRecorder is the mock recorder for MockProtocolManagerDownloader. 27 type MockProtocolManagerDownloaderMockRecorder struct { 28 mock *MockProtocolManagerDownloader 29 } 30 31 // NewMockProtocolManagerDownloader creates a new mock instance. 32 func NewMockProtocolManagerDownloader(ctrl *gomock.Controller) *MockProtocolManagerDownloader { 33 mock := &MockProtocolManagerDownloader{ctrl: ctrl} 34 mock.recorder = &MockProtocolManagerDownloaderMockRecorder{mock} 35 return mock 36 } 37 38 // EXPECT returns an object that allows the caller to indicate expected use. 39 func (m *MockProtocolManagerDownloader) EXPECT() *MockProtocolManagerDownloaderMockRecorder { 40 return m.recorder 41 } 42 43 // Cancel mocks base method. 44 func (m *MockProtocolManagerDownloader) Cancel() { 45 m.ctrl.T.Helper() 46 m.ctrl.Call(m, "Cancel") 47 } 48 49 // Cancel indicates an expected call of Cancel. 50 func (mr *MockProtocolManagerDownloaderMockRecorder) Cancel() *gomock.Call { 51 mr.mock.ctrl.T.Helper() 52 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cancel", reflect.TypeOf((*MockProtocolManagerDownloader)(nil).Cancel)) 53 } 54 55 // DeliverBodies mocks base method. 56 func (m *MockProtocolManagerDownloader) DeliverBodies(arg0 string, arg1 [][]*types.Transaction) error { 57 m.ctrl.T.Helper() 58 ret := m.ctrl.Call(m, "DeliverBodies", arg0, arg1) 59 ret0, _ := ret[0].(error) 60 return ret0 61 } 62 63 // DeliverBodies indicates an expected call of DeliverBodies. 64 func (mr *MockProtocolManagerDownloaderMockRecorder) DeliverBodies(arg0, arg1 interface{}) *gomock.Call { 65 mr.mock.ctrl.T.Helper() 66 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeliverBodies", reflect.TypeOf((*MockProtocolManagerDownloader)(nil).DeliverBodies), arg0, arg1) 67 } 68 69 // DeliverHeaders mocks base method. 70 func (m *MockProtocolManagerDownloader) DeliverHeaders(arg0 string, arg1 []*types.Header) error { 71 m.ctrl.T.Helper() 72 ret := m.ctrl.Call(m, "DeliverHeaders", arg0, arg1) 73 ret0, _ := ret[0].(error) 74 return ret0 75 } 76 77 // DeliverHeaders indicates an expected call of DeliverHeaders. 78 func (mr *MockProtocolManagerDownloaderMockRecorder) DeliverHeaders(arg0, arg1 interface{}) *gomock.Call { 79 mr.mock.ctrl.T.Helper() 80 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeliverHeaders", reflect.TypeOf((*MockProtocolManagerDownloader)(nil).DeliverHeaders), arg0, arg1) 81 } 82 83 // DeliverNodeData mocks base method. 84 func (m *MockProtocolManagerDownloader) DeliverNodeData(arg0 string, arg1 [][]byte) error { 85 m.ctrl.T.Helper() 86 ret := m.ctrl.Call(m, "DeliverNodeData", arg0, arg1) 87 ret0, _ := ret[0].(error) 88 return ret0 89 } 90 91 // DeliverNodeData indicates an expected call of DeliverNodeData. 92 func (mr *MockProtocolManagerDownloaderMockRecorder) DeliverNodeData(arg0, arg1 interface{}) *gomock.Call { 93 mr.mock.ctrl.T.Helper() 94 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeliverNodeData", reflect.TypeOf((*MockProtocolManagerDownloader)(nil).DeliverNodeData), arg0, arg1) 95 } 96 97 // DeliverReceipts mocks base method. 98 func (m *MockProtocolManagerDownloader) DeliverReceipts(arg0 string, arg1 [][]*types.Receipt) error { 99 m.ctrl.T.Helper() 100 ret := m.ctrl.Call(m, "DeliverReceipts", arg0, arg1) 101 ret0, _ := ret[0].(error) 102 return ret0 103 } 104 105 // DeliverReceipts indicates an expected call of DeliverReceipts. 106 func (mr *MockProtocolManagerDownloaderMockRecorder) DeliverReceipts(arg0, arg1 interface{}) *gomock.Call { 107 mr.mock.ctrl.T.Helper() 108 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeliverReceipts", reflect.TypeOf((*MockProtocolManagerDownloader)(nil).DeliverReceipts), arg0, arg1) 109 } 110 111 // DeliverSnapPacket mocks base method. 112 func (m *MockProtocolManagerDownloader) DeliverSnapPacket(arg0 *snap.Peer, arg1 snap.Packet) error { 113 m.ctrl.T.Helper() 114 ret := m.ctrl.Call(m, "DeliverSnapPacket", arg0, arg1) 115 ret0, _ := ret[0].(error) 116 return ret0 117 } 118 119 // DeliverSnapPacket indicates an expected call of DeliverSnapPacket. 120 func (mr *MockProtocolManagerDownloaderMockRecorder) DeliverSnapPacket(arg0, arg1 interface{}) *gomock.Call { 121 mr.mock.ctrl.T.Helper() 122 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeliverSnapPacket", reflect.TypeOf((*MockProtocolManagerDownloader)(nil).DeliverSnapPacket), arg0, arg1) 123 } 124 125 // DeliverStakingInfos mocks base method. 126 func (m *MockProtocolManagerDownloader) DeliverStakingInfos(arg0 string, arg1 []*reward.StakingInfo) error { 127 m.ctrl.T.Helper() 128 ret := m.ctrl.Call(m, "DeliverStakingInfos", arg0, arg1) 129 ret0, _ := ret[0].(error) 130 return ret0 131 } 132 133 // DeliverStakingInfos indicates an expected call of DeliverStakingInfos. 134 func (mr *MockProtocolManagerDownloaderMockRecorder) DeliverStakingInfos(arg0, arg1 interface{}) *gomock.Call { 135 mr.mock.ctrl.T.Helper() 136 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeliverStakingInfos", reflect.TypeOf((*MockProtocolManagerDownloader)(nil).DeliverStakingInfos), arg0, arg1) 137 } 138 139 // GetSnapSyncer mocks base method. 140 func (m *MockProtocolManagerDownloader) GetSnapSyncer() *snap.Syncer { 141 m.ctrl.T.Helper() 142 ret := m.ctrl.Call(m, "GetSnapSyncer") 143 ret0, _ := ret[0].(*snap.Syncer) 144 return ret0 145 } 146 147 // GetSnapSyncer indicates an expected call of GetSnapSyncer. 148 func (mr *MockProtocolManagerDownloaderMockRecorder) GetSnapSyncer() *gomock.Call { 149 mr.mock.ctrl.T.Helper() 150 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSnapSyncer", reflect.TypeOf((*MockProtocolManagerDownloader)(nil).GetSnapSyncer)) 151 } 152 153 // Progress mocks base method. 154 func (m *MockProtocolManagerDownloader) Progress() klaytn.SyncProgress { 155 m.ctrl.T.Helper() 156 ret := m.ctrl.Call(m, "Progress") 157 ret0, _ := ret[0].(klaytn.SyncProgress) 158 return ret0 159 } 160 161 // Progress indicates an expected call of Progress. 162 func (mr *MockProtocolManagerDownloaderMockRecorder) Progress() *gomock.Call { 163 mr.mock.ctrl.T.Helper() 164 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Progress", reflect.TypeOf((*MockProtocolManagerDownloader)(nil).Progress)) 165 } 166 167 // RegisterPeer mocks base method. 168 func (m *MockProtocolManagerDownloader) RegisterPeer(arg0 string, arg1 int, arg2 downloader.Peer) error { 169 m.ctrl.T.Helper() 170 ret := m.ctrl.Call(m, "RegisterPeer", arg0, arg1, arg2) 171 ret0, _ := ret[0].(error) 172 return ret0 173 } 174 175 // RegisterPeer indicates an expected call of RegisterPeer. 176 func (mr *MockProtocolManagerDownloaderMockRecorder) RegisterPeer(arg0, arg1, arg2 interface{}) *gomock.Call { 177 mr.mock.ctrl.T.Helper() 178 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterPeer", reflect.TypeOf((*MockProtocolManagerDownloader)(nil).RegisterPeer), arg0, arg1, arg2) 179 } 180 181 // SyncStakingInfo mocks base method. 182 func (m *MockProtocolManagerDownloader) SyncStakingInfo(arg0 string, arg1, arg2 uint64) error { 183 m.ctrl.T.Helper() 184 ret := m.ctrl.Call(m, "SyncStakingInfo", arg0, arg1, arg2) 185 ret0, _ := ret[0].(error) 186 return ret0 187 } 188 189 // SyncStakingInfo indicates an expected call of SyncStakingInfo. 190 func (mr *MockProtocolManagerDownloaderMockRecorder) SyncStakingInfo(arg0, arg1, arg2 interface{}) *gomock.Call { 191 mr.mock.ctrl.T.Helper() 192 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncStakingInfo", reflect.TypeOf((*MockProtocolManagerDownloader)(nil).SyncStakingInfo), arg0, arg1, arg2) 193 } 194 195 // SyncStakingInfoStatus mocks base method. 196 func (m *MockProtocolManagerDownloader) SyncStakingInfoStatus() *downloader.SyncingStatus { 197 m.ctrl.T.Helper() 198 ret := m.ctrl.Call(m, "SyncStakingInfoStatus") 199 ret0, _ := ret[0].(*downloader.SyncingStatus) 200 return ret0 201 } 202 203 // SyncStakingInfoStatus indicates an expected call of SyncStakingInfoStatus. 204 func (mr *MockProtocolManagerDownloaderMockRecorder) SyncStakingInfoStatus() *gomock.Call { 205 mr.mock.ctrl.T.Helper() 206 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncStakingInfoStatus", reflect.TypeOf((*MockProtocolManagerDownloader)(nil).SyncStakingInfoStatus)) 207 } 208 209 // Synchronise mocks base method. 210 func (m *MockProtocolManagerDownloader) Synchronise(arg0 string, arg1 common.Hash, arg2 *big.Int, arg3 downloader.SyncMode) error { 211 m.ctrl.T.Helper() 212 ret := m.ctrl.Call(m, "Synchronise", arg0, arg1, arg2, arg3) 213 ret0, _ := ret[0].(error) 214 return ret0 215 } 216 217 // Synchronise indicates an expected call of Synchronise. 218 func (mr *MockProtocolManagerDownloaderMockRecorder) Synchronise(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { 219 mr.mock.ctrl.T.Helper() 220 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Synchronise", reflect.TypeOf((*MockProtocolManagerDownloader)(nil).Synchronise), arg0, arg1, arg2, arg3) 221 } 222 223 // Terminate mocks base method. 224 func (m *MockProtocolManagerDownloader) Terminate() { 225 m.ctrl.T.Helper() 226 m.ctrl.Call(m, "Terminate") 227 } 228 229 // Terminate indicates an expected call of Terminate. 230 func (mr *MockProtocolManagerDownloaderMockRecorder) Terminate() *gomock.Call { 231 mr.mock.ctrl.T.Helper() 232 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Terminate", reflect.TypeOf((*MockProtocolManagerDownloader)(nil).Terminate)) 233 } 234 235 // UnregisterPeer mocks base method. 236 func (m *MockProtocolManagerDownloader) UnregisterPeer(arg0 string) error { 237 m.ctrl.T.Helper() 238 ret := m.ctrl.Call(m, "UnregisterPeer", arg0) 239 ret0, _ := ret[0].(error) 240 return ret0 241 } 242 243 // UnregisterPeer indicates an expected call of UnregisterPeer. 244 func (mr *MockProtocolManagerDownloaderMockRecorder) UnregisterPeer(arg0 interface{}) *gomock.Call { 245 mr.mock.ctrl.T.Helper() 246 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnregisterPeer", reflect.TypeOf((*MockProtocolManagerDownloader)(nil).UnregisterPeer), arg0) 247 }