-
Notifications
You must be signed in to change notification settings - Fork 179
/
sync_core.go
81 lines (65 loc) · 1.86 KB
/
sync_core.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mock
import (
flow "github.com/onflow/flow-go/model/flow"
mock "github.com/stretchr/testify/mock"
)
// SyncCore is an autogenerated mock type for the SyncCore type
type SyncCore struct {
mock.Mock
}
// BatchRequested provides a mock function with given fields: batch
func (_m *SyncCore) BatchRequested(batch flow.Batch) {
_m.Called(batch)
}
// HandleBlock provides a mock function with given fields: header
func (_m *SyncCore) HandleBlock(header *flow.Header) bool {
ret := _m.Called(header)
var r0 bool
if rf, ok := ret.Get(0).(func(*flow.Header) bool); ok {
r0 = rf(header)
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// HandleHeight provides a mock function with given fields: final, height
func (_m *SyncCore) HandleHeight(final *flow.Header, height uint64) {
_m.Called(final, height)
}
// RangeRequested provides a mock function with given fields: ran
func (_m *SyncCore) RangeRequested(ran flow.Range) {
_m.Called(ran)
}
// ScanPending provides a mock function with given fields: final
func (_m *SyncCore) ScanPending(final *flow.Header) ([]flow.Range, []flow.Batch) {
ret := _m.Called(final)
var r0 []flow.Range
if rf, ok := ret.Get(0).(func(*flow.Header) []flow.Range); ok {
r0 = rf(final)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]flow.Range)
}
}
var r1 []flow.Batch
if rf, ok := ret.Get(1).(func(*flow.Header) []flow.Batch); ok {
r1 = rf(final)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).([]flow.Batch)
}
}
return r0, r1
}
// WithinTolerance provides a mock function with given fields: final, height
func (_m *SyncCore) WithinTolerance(final *flow.Header, height uint64) bool {
ret := _m.Called(final, height)
var r0 bool
if rf, ok := ret.Get(0).(func(*flow.Header, uint64) bool); ok {
r0 = rf(final, height)
} else {
r0 = ret.Get(0).(bool)
}
return r0
}