github.com/onflow/flow-go@v0.33.17/consensus/hotstuff/block_producer.go (about)

     1  package hotstuff
     2  
     3  import (
     4  	"github.com/onflow/flow-go/model/flow"
     5  )
     6  
     7  // BlockProducer builds a new block proposal by building a new block payload with the builder module,
     8  // and uses VoteCollectorFactory to create a disposable VoteCollector for producing the proposal vote.
     9  // BlockProducer assembles the new block proposal using the block payload, block header and the proposal vote.
    10  type BlockProducer interface {
    11  	// MakeBlockProposal builds a new HotStuff block proposal using the given view,
    12  	// the given quorum certificate for its parent and [optionally] a timeout certificate for last view(could be nil).
    13  	// No errors are expected during normal operation.
    14  	MakeBlockProposal(view uint64, qc *flow.QuorumCertificate, lastViewTC *flow.TimeoutCertificate) (*flow.Header, error)
    15  }