github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/consensus/hotstuff/mocks/participant_consumer.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 hotstuff "github.com/onflow/flow-go/consensus/hotstuff" 7 flow "github.com/onflow/flow-go/model/flow" 8 9 mock "github.com/stretchr/testify/mock" 10 11 model "github.com/onflow/flow-go/consensus/hotstuff/model" 12 ) 13 14 // ParticipantConsumer is an autogenerated mock type for the ParticipantConsumer type 15 type ParticipantConsumer struct { 16 mock.Mock 17 } 18 19 // OnCurrentViewDetails provides a mock function with given fields: currentView, finalizedView, currentLeader 20 func (_m *ParticipantConsumer) OnCurrentViewDetails(currentView uint64, finalizedView uint64, currentLeader flow.Identifier) { 21 _m.Called(currentView, finalizedView, currentLeader) 22 } 23 24 // OnEventProcessed provides a mock function with given fields: 25 func (_m *ParticipantConsumer) OnEventProcessed() { 26 _m.Called() 27 } 28 29 // OnLocalTimeout provides a mock function with given fields: currentView 30 func (_m *ParticipantConsumer) OnLocalTimeout(currentView uint64) { 31 _m.Called(currentView) 32 } 33 34 // OnPartialTc provides a mock function with given fields: currentView, partialTc 35 func (_m *ParticipantConsumer) OnPartialTc(currentView uint64, partialTc *hotstuff.PartialTcCreated) { 36 _m.Called(currentView, partialTc) 37 } 38 39 // OnQcTriggeredViewChange provides a mock function with given fields: oldView, newView, qc 40 func (_m *ParticipantConsumer) OnQcTriggeredViewChange(oldView uint64, newView uint64, qc *flow.QuorumCertificate) { 41 _m.Called(oldView, newView, qc) 42 } 43 44 // OnReceiveProposal provides a mock function with given fields: currentView, proposal 45 func (_m *ParticipantConsumer) OnReceiveProposal(currentView uint64, proposal *model.Proposal) { 46 _m.Called(currentView, proposal) 47 } 48 49 // OnReceiveQc provides a mock function with given fields: currentView, qc 50 func (_m *ParticipantConsumer) OnReceiveQc(currentView uint64, qc *flow.QuorumCertificate) { 51 _m.Called(currentView, qc) 52 } 53 54 // OnReceiveTc provides a mock function with given fields: currentView, tc 55 func (_m *ParticipantConsumer) OnReceiveTc(currentView uint64, tc *flow.TimeoutCertificate) { 56 _m.Called(currentView, tc) 57 } 58 59 // OnStart provides a mock function with given fields: currentView 60 func (_m *ParticipantConsumer) OnStart(currentView uint64) { 61 _m.Called(currentView) 62 } 63 64 // OnStartingTimeout provides a mock function with given fields: _a0 65 func (_m *ParticipantConsumer) OnStartingTimeout(_a0 model.TimerInfo) { 66 _m.Called(_a0) 67 } 68 69 // OnTcTriggeredViewChange provides a mock function with given fields: oldView, newView, tc 70 func (_m *ParticipantConsumer) OnTcTriggeredViewChange(oldView uint64, newView uint64, tc *flow.TimeoutCertificate) { 71 _m.Called(oldView, newView, tc) 72 } 73 74 // OnViewChange provides a mock function with given fields: oldView, newView 75 func (_m *ParticipantConsumer) OnViewChange(oldView uint64, newView uint64) { 76 _m.Called(oldView, newView) 77 } 78 79 type mockConstructorTestingTNewParticipantConsumer interface { 80 mock.TestingT 81 Cleanup(func()) 82 } 83 84 // 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. 85 func NewParticipantConsumer(t mockConstructorTestingTNewParticipantConsumer) *ParticipantConsumer { 86 mock := &ParticipantConsumer{} 87 mock.Mock.Test(t) 88 89 t.Cleanup(func() { mock.AssertExpectations(t) }) 90 91 return mock 92 }