github.com/koko1123/flow-go-1@v0.29.6/consensus/hotstuff/mocks/consumer.go (about)

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	flow "github.com/koko1123/flow-go-1/model/flow"
     7  
     8  	mock "github.com/stretchr/testify/mock"
     9  
    10  	model "github.com/koko1123/flow-go-1/consensus/hotstuff/model"
    11  )
    12  
    13  // Consumer is an autogenerated mock type for the Consumer type
    14  type Consumer struct {
    15  	mock.Mock
    16  }
    17  
    18  // OnBlockIncorporated provides a mock function with given fields: _a0
    19  func (_m *Consumer) OnBlockIncorporated(_a0 *model.Block) {
    20  	_m.Called(_a0)
    21  }
    22  
    23  // OnDoubleProposeDetected provides a mock function with given fields: _a0, _a1
    24  func (_m *Consumer) OnDoubleProposeDetected(_a0 *model.Block, _a1 *model.Block) {
    25  	_m.Called(_a0, _a1)
    26  }
    27  
    28  // OnDoubleVotingDetected provides a mock function with given fields: _a0, _a1
    29  func (_m *Consumer) OnDoubleVotingDetected(_a0 *model.Vote, _a1 *model.Vote) {
    30  	_m.Called(_a0, _a1)
    31  }
    32  
    33  // OnEnteringView provides a mock function with given fields: viewNumber, leader
    34  func (_m *Consumer) OnEnteringView(viewNumber uint64, leader flow.Identifier) {
    35  	_m.Called(viewNumber, leader)
    36  }
    37  
    38  // OnEventProcessed provides a mock function with given fields:
    39  func (_m *Consumer) OnEventProcessed() {
    40  	_m.Called()
    41  }
    42  
    43  // OnFinalizedBlock provides a mock function with given fields: _a0
    44  func (_m *Consumer) OnFinalizedBlock(_a0 *model.Block) {
    45  	_m.Called(_a0)
    46  }
    47  
    48  // OnForkChoiceGenerated provides a mock function with given fields: _a0, _a1
    49  func (_m *Consumer) OnForkChoiceGenerated(_a0 uint64, _a1 *flow.QuorumCertificate) {
    50  	_m.Called(_a0, _a1)
    51  }
    52  
    53  // OnInvalidVoteDetected provides a mock function with given fields: _a0
    54  func (_m *Consumer) OnInvalidVoteDetected(_a0 *model.Vote) {
    55  	_m.Called(_a0)
    56  }
    57  
    58  // OnProposingBlock provides a mock function with given fields: proposal
    59  func (_m *Consumer) OnProposingBlock(proposal *model.Proposal) {
    60  	_m.Called(proposal)
    61  }
    62  
    63  // OnQcConstructedFromVotes provides a mock function with given fields: curView, qc
    64  func (_m *Consumer) OnQcConstructedFromVotes(curView uint64, qc *flow.QuorumCertificate) {
    65  	_m.Called(curView, qc)
    66  }
    67  
    68  // OnQcIncorporated provides a mock function with given fields: _a0
    69  func (_m *Consumer) OnQcIncorporated(_a0 *flow.QuorumCertificate) {
    70  	_m.Called(_a0)
    71  }
    72  
    73  // OnQcTriggeredViewChange provides a mock function with given fields: qc, newView
    74  func (_m *Consumer) OnQcTriggeredViewChange(qc *flow.QuorumCertificate, newView uint64) {
    75  	_m.Called(qc, newView)
    76  }
    77  
    78  // OnReachedTimeout provides a mock function with given fields: timeout
    79  func (_m *Consumer) OnReachedTimeout(timeout *model.TimerInfo) {
    80  	_m.Called(timeout)
    81  }
    82  
    83  // OnReceiveProposal provides a mock function with given fields: currentView, proposal
    84  func (_m *Consumer) OnReceiveProposal(currentView uint64, proposal *model.Proposal) {
    85  	_m.Called(currentView, proposal)
    86  }
    87  
    88  // OnReceiveVote provides a mock function with given fields: currentView, vote
    89  func (_m *Consumer) OnReceiveVote(currentView uint64, vote *model.Vote) {
    90  	_m.Called(currentView, vote)
    91  }
    92  
    93  // OnStartingTimeout provides a mock function with given fields: _a0
    94  func (_m *Consumer) OnStartingTimeout(_a0 *model.TimerInfo) {
    95  	_m.Called(_a0)
    96  }
    97  
    98  // OnVoteForInvalidBlockDetected provides a mock function with given fields: vote, invalidProposal
    99  func (_m *Consumer) OnVoteForInvalidBlockDetected(vote *model.Vote, invalidProposal *model.Proposal) {
   100  	_m.Called(vote, invalidProposal)
   101  }
   102  
   103  // OnVoting provides a mock function with given fields: vote
   104  func (_m *Consumer) OnVoting(vote *model.Vote) {
   105  	_m.Called(vote)
   106  }
   107  
   108  type mockConstructorTestingTNewConsumer interface {
   109  	mock.TestingT
   110  	Cleanup(func())
   111  }
   112  
   113  // NewConsumer creates a new instance of Consumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   114  func NewConsumer(t mockConstructorTestingTNewConsumer) *Consumer {
   115  	mock := &Consumer{}
   116  	mock.Mock.Test(t)
   117  
   118  	t.Cleanup(func() { mock.AssertExpectations(t) })
   119  
   120  	return mock
   121  }