-
Notifications
You must be signed in to change notification settings - Fork 211
/
tortoise.go
128 lines (107 loc) · 4.2 KB
/
tortoise.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
// Code generated by MockGen. DO NOT EDIT.
// Source: ./tortoise.go
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
types "github.com/spacemeshos/go-spacemesh/common/types"
result "github.com/spacemeshos/go-spacemesh/common/types/result"
)
// MockTortoise is a mock of Tortoise interface.
type MockTortoise struct {
ctrl *gomock.Controller
recorder *MockTortoiseMockRecorder
}
// MockTortoiseMockRecorder is the mock recorder for MockTortoise.
type MockTortoiseMockRecorder struct {
mock *MockTortoise
}
// NewMockTortoise creates a new mock instance.
func NewMockTortoise(ctrl *gomock.Controller) *MockTortoise {
mock := &MockTortoise{ctrl: ctrl}
mock.recorder = &MockTortoiseMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockTortoise) EXPECT() *MockTortoiseMockRecorder {
return m.recorder
}
// LatestComplete mocks base method.
func (m *MockTortoise) LatestComplete() types.LayerID {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LatestComplete")
ret0, _ := ret[0].(types.LayerID)
return ret0
}
// LatestComplete indicates an expected call of LatestComplete.
func (mr *MockTortoiseMockRecorder) LatestComplete() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestComplete", reflect.TypeOf((*MockTortoise)(nil).LatestComplete))
}
// OnBlock mocks base method.
func (m *MockTortoise) OnBlock(arg0 types.BlockHeader) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "OnBlock", arg0)
}
// OnBlock indicates an expected call of OnBlock.
func (mr *MockTortoiseMockRecorder) OnBlock(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnBlock", reflect.TypeOf((*MockTortoise)(nil).OnBlock), arg0)
}
// OnHareOutput mocks base method.
func (m *MockTortoise) OnHareOutput(arg0 types.LayerID, arg1 types.BlockID) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "OnHareOutput", arg0, arg1)
}
// OnHareOutput indicates an expected call of OnHareOutput.
func (mr *MockTortoiseMockRecorder) OnHareOutput(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnHareOutput", reflect.TypeOf((*MockTortoise)(nil).OnHareOutput), arg0, arg1)
}
// OnWeakCoin mocks base method.
func (m *MockTortoise) OnWeakCoin(arg0 types.LayerID, arg1 bool) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "OnWeakCoin", arg0, arg1)
}
// OnWeakCoin indicates an expected call of OnWeakCoin.
func (mr *MockTortoiseMockRecorder) OnWeakCoin(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnWeakCoin", reflect.TypeOf((*MockTortoise)(nil).OnWeakCoin), arg0, arg1)
}
// Results mocks base method.
func (m *MockTortoise) Results(from, to types.LayerID) ([]result.Layer, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Results", from, to)
ret0, _ := ret[0].([]result.Layer)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Results indicates an expected call of Results.
func (mr *MockTortoiseMockRecorder) Results(from, to interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Results", reflect.TypeOf((*MockTortoise)(nil).Results), from, to)
}
// TallyVotes mocks base method.
func (m *MockTortoise) TallyVotes(arg0 context.Context, arg1 types.LayerID) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "TallyVotes", arg0, arg1)
}
// TallyVotes indicates an expected call of TallyVotes.
func (mr *MockTortoiseMockRecorder) TallyVotes(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TallyVotes", reflect.TypeOf((*MockTortoise)(nil).TallyVotes), arg0, arg1)
}
// Updates mocks base method.
func (m *MockTortoise) Updates() []result.Layer {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Updates")
ret0, _ := ret[0].([]result.Layer)
return ret0
}
// Updates indicates an expected call of Updates.
func (mr *MockTortoiseMockRecorder) Updates() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Updates", reflect.TypeOf((*MockTortoise)(nil).Updates))
}