github.com/koko1123/flow-go-1@v0.29.6/module/mock/sync_core.go (about)

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	chainsync "github.com/koko1123/flow-go-1/model/chainsync"
     7  	flow "github.com/koko1123/flow-go-1/model/flow"
     8  
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // SyncCore is an autogenerated mock type for the SyncCore type
    13  type SyncCore struct {
    14  	mock.Mock
    15  }
    16  
    17  // BatchRequested provides a mock function with given fields: batch
    18  func (_m *SyncCore) BatchRequested(batch chainsync.Batch) {
    19  	_m.Called(batch)
    20  }
    21  
    22  // HandleBlock provides a mock function with given fields: header
    23  func (_m *SyncCore) HandleBlock(header *flow.Header) bool {
    24  	ret := _m.Called(header)
    25  
    26  	var r0 bool
    27  	if rf, ok := ret.Get(0).(func(*flow.Header) bool); ok {
    28  		r0 = rf(header)
    29  	} else {
    30  		r0 = ret.Get(0).(bool)
    31  	}
    32  
    33  	return r0
    34  }
    35  
    36  // HandleHeight provides a mock function with given fields: final, height
    37  func (_m *SyncCore) HandleHeight(final *flow.Header, height uint64) {
    38  	_m.Called(final, height)
    39  }
    40  
    41  // RangeRequested provides a mock function with given fields: ran
    42  func (_m *SyncCore) RangeRequested(ran chainsync.Range) {
    43  	_m.Called(ran)
    44  }
    45  
    46  // ScanPending provides a mock function with given fields: final
    47  func (_m *SyncCore) ScanPending(final *flow.Header) ([]chainsync.Range, []chainsync.Batch) {
    48  	ret := _m.Called(final)
    49  
    50  	var r0 []chainsync.Range
    51  	if rf, ok := ret.Get(0).(func(*flow.Header) []chainsync.Range); ok {
    52  		r0 = rf(final)
    53  	} else {
    54  		if ret.Get(0) != nil {
    55  			r0 = ret.Get(0).([]chainsync.Range)
    56  		}
    57  	}
    58  
    59  	var r1 []chainsync.Batch
    60  	if rf, ok := ret.Get(1).(func(*flow.Header) []chainsync.Batch); ok {
    61  		r1 = rf(final)
    62  	} else {
    63  		if ret.Get(1) != nil {
    64  			r1 = ret.Get(1).([]chainsync.Batch)
    65  		}
    66  	}
    67  
    68  	return r0, r1
    69  }
    70  
    71  // WithinTolerance provides a mock function with given fields: final, height
    72  func (_m *SyncCore) WithinTolerance(final *flow.Header, height uint64) bool {
    73  	ret := _m.Called(final, height)
    74  
    75  	var r0 bool
    76  	if rf, ok := ret.Get(0).(func(*flow.Header, uint64) bool); ok {
    77  		r0 = rf(final, height)
    78  	} else {
    79  		r0 = ret.Get(0).(bool)
    80  	}
    81  
    82  	return r0
    83  }
    84  
    85  type mockConstructorTestingTNewSyncCore interface {
    86  	mock.TestingT
    87  	Cleanup(func())
    88  }
    89  
    90  // NewSyncCore creates a new instance of SyncCore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    91  func NewSyncCore(t mockConstructorTestingTNewSyncCore) *SyncCore {
    92  	mock := &SyncCore{}
    93  	mock.Mock.Test(t)
    94  
    95  	t.Cleanup(func() { mock.AssertExpectations(t) })
    96  
    97  	return mock
    98  }