-
Notifications
You must be signed in to change notification settings - Fork 177
/
participant_consumer.go
92 lines (71 loc) · 3.27 KB
/
participant_consumer.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
// Code generated by mockery v2.21.4. DO NOT EDIT.
package mocks
import (
hotstuff "github.com/onflow/flow-go/consensus/hotstuff"
flow "github.com/onflow/flow-go/model/flow"
mock "github.com/stretchr/testify/mock"
model "github.com/onflow/flow-go/consensus/hotstuff/model"
)
// ParticipantConsumer is an autogenerated mock type for the ParticipantConsumer type
type ParticipantConsumer struct {
mock.Mock
}
// OnCurrentViewDetails provides a mock function with given fields: currentView, finalizedView, currentLeader
func (_m *ParticipantConsumer) OnCurrentViewDetails(currentView uint64, finalizedView uint64, currentLeader flow.Identifier) {
_m.Called(currentView, finalizedView, currentLeader)
}
// OnEventProcessed provides a mock function with given fields:
func (_m *ParticipantConsumer) OnEventProcessed() {
_m.Called()
}
// OnLocalTimeout provides a mock function with given fields: currentView
func (_m *ParticipantConsumer) OnLocalTimeout(currentView uint64) {
_m.Called(currentView)
}
// OnPartialTc provides a mock function with given fields: currentView, partialTc
func (_m *ParticipantConsumer) OnPartialTc(currentView uint64, partialTc *hotstuff.PartialTcCreated) {
_m.Called(currentView, partialTc)
}
// OnQcTriggeredViewChange provides a mock function with given fields: oldView, newView, qc
func (_m *ParticipantConsumer) OnQcTriggeredViewChange(oldView uint64, newView uint64, qc *flow.QuorumCertificate) {
_m.Called(oldView, newView, qc)
}
// OnReceiveProposal provides a mock function with given fields: currentView, proposal
func (_m *ParticipantConsumer) OnReceiveProposal(currentView uint64, proposal *model.Proposal) {
_m.Called(currentView, proposal)
}
// OnReceiveQc provides a mock function with given fields: currentView, qc
func (_m *ParticipantConsumer) OnReceiveQc(currentView uint64, qc *flow.QuorumCertificate) {
_m.Called(currentView, qc)
}
// OnReceiveTc provides a mock function with given fields: currentView, tc
func (_m *ParticipantConsumer) OnReceiveTc(currentView uint64, tc *flow.TimeoutCertificate) {
_m.Called(currentView, tc)
}
// OnStart provides a mock function with given fields: currentView
func (_m *ParticipantConsumer) OnStart(currentView uint64) {
_m.Called(currentView)
}
// OnStartingTimeout provides a mock function with given fields: _a0
func (_m *ParticipantConsumer) OnStartingTimeout(_a0 model.TimerInfo) {
_m.Called(_a0)
}
// OnTcTriggeredViewChange provides a mock function with given fields: oldView, newView, tc
func (_m *ParticipantConsumer) OnTcTriggeredViewChange(oldView uint64, newView uint64, tc *flow.TimeoutCertificate) {
_m.Called(oldView, newView, tc)
}
// OnViewChange provides a mock function with given fields: oldView, newView
func (_m *ParticipantConsumer) OnViewChange(oldView uint64, newView uint64) {
_m.Called(oldView, newView)
}
type mockConstructorTestingTNewParticipantConsumer interface {
mock.TestingT
Cleanup(func())
}
// NewParticipantConsumer creates a new instance of ParticipantConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewParticipantConsumer(t mockConstructorTestingTNewParticipantConsumer) *ParticipantConsumer {
mock := &ParticipantConsumer{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}