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

     1  package notifications
     2  
     3  import (
     4  	"github.com/koko1123/flow-go-1/consensus/hotstuff"
     5  	"github.com/koko1123/flow-go-1/consensus/hotstuff/model"
     6  	"github.com/koko1123/flow-go-1/model/flow"
     7  )
     8  
     9  // NoopConsumer is an implementation of the notifications consumer that
    10  // doesn't do anything.
    11  type NoopConsumer struct{}
    12  
    13  var _ hotstuff.Consumer = (*NoopConsumer)(nil)
    14  
    15  func NewNoopConsumer() *NoopConsumer {
    16  	nc := &NoopConsumer{}
    17  	return nc
    18  }
    19  
    20  func (*NoopConsumer) OnEventProcessed() {}
    21  
    22  func (*NoopConsumer) OnBlockIncorporated(*model.Block) {}
    23  
    24  func (*NoopConsumer) OnFinalizedBlock(*model.Block) {}
    25  
    26  func (*NoopConsumer) OnDoubleProposeDetected(*model.Block, *model.Block) {}
    27  
    28  func (c *NoopConsumer) OnReceiveVote(uint64, *model.Vote) {}
    29  
    30  func (c *NoopConsumer) OnReceiveProposal(uint64, *model.Proposal) {}
    31  
    32  func (*NoopConsumer) OnEnteringView(uint64, flow.Identifier) {}
    33  
    34  func (c *NoopConsumer) OnQcTriggeredViewChange(*flow.QuorumCertificate, uint64) {}
    35  
    36  func (c *NoopConsumer) OnProposingBlock(*model.Proposal) {}
    37  
    38  func (c *NoopConsumer) OnVoting(*model.Vote) {}
    39  
    40  func (c *NoopConsumer) OnQcConstructedFromVotes(curView uint64, qc *flow.QuorumCertificate) {}
    41  
    42  func (*NoopConsumer) OnStartingTimeout(*model.TimerInfo) {}
    43  
    44  func (*NoopConsumer) OnReachedTimeout(*model.TimerInfo) {}
    45  
    46  func (*NoopConsumer) OnQcIncorporated(*flow.QuorumCertificate) {}
    47  
    48  func (*NoopConsumer) OnForkChoiceGenerated(uint64, *flow.QuorumCertificate) {}
    49  
    50  func (*NoopConsumer) OnDoubleVotingDetected(*model.Vote, *model.Vote) {}
    51  
    52  func (*NoopConsumer) OnInvalidVoteDetected(*model.Vote) {}
    53  
    54  func (*NoopConsumer) OnVoteForInvalidBlockDetected(*model.Vote, *model.Proposal) {}