github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mock/sync_core.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	chainsync "github.com/onflow/flow-go/model/chainsync"
     7  	flow "github.com/onflow/flow-go/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  	var r1 []chainsync.Batch
    52  	if rf, ok := ret.Get(0).(func(*flow.Header) ([]chainsync.Range, []chainsync.Batch)); ok {
    53  		return rf(final)
    54  	}
    55  	if rf, ok := ret.Get(0).(func(*flow.Header) []chainsync.Range); ok {
    56  		r0 = rf(final)
    57  	} else {
    58  		if ret.Get(0) != nil {
    59  			r0 = ret.Get(0).([]chainsync.Range)
    60  		}
    61  	}
    62  
    63  	if rf, ok := ret.Get(1).(func(*flow.Header) []chainsync.Batch); ok {
    64  		r1 = rf(final)
    65  	} else {
    66  		if ret.Get(1) != nil {
    67  			r1 = ret.Get(1).([]chainsync.Batch)
    68  		}
    69  	}
    70  
    71  	return r0, r1
    72  }
    73  
    74  // WithinTolerance provides a mock function with given fields: final, height
    75  func (_m *SyncCore) WithinTolerance(final *flow.Header, height uint64) bool {
    76  	ret := _m.Called(final, height)
    77  
    78  	var r0 bool
    79  	if rf, ok := ret.Get(0).(func(*flow.Header, uint64) bool); ok {
    80  		r0 = rf(final, height)
    81  	} else {
    82  		r0 = ret.Get(0).(bool)
    83  	}
    84  
    85  	return r0
    86  }
    87  
    88  type mockConstructorTestingTNewSyncCore interface {
    89  	mock.TestingT
    90  	Cleanup(func())
    91  }
    92  
    93  // 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.
    94  func NewSyncCore(t mockConstructorTestingTNewSyncCore) *SyncCore {
    95  	mock := &SyncCore{}
    96  	mock.Mock.Test(t)
    97  
    98  	t.Cleanup(func() { mock.AssertExpectations(t) })
    99  
   100  	return mock
   101  }