-
Notifications
You must be signed in to change notification settings - Fork 179
/
signer.go
21 lines (17 loc) · 908 Bytes
/
signer.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package hotstuff
import (
"github.com/onflow/flow-go/consensus/hotstuff/model"
"github.com/onflow/flow-go/model/flow"
)
// Signer is responsible for creating votes, proposals for a given block.
type Signer interface {
// CreateProposal creates a proposal for the given block. No error returns
// are expected during normal operations (incl. presence of byz. actors).
CreateProposal(block *model.Block) (*model.Proposal, error)
// CreateVote creates a vote for the given block. No error returns are
// expected during normal operations (incl. presence of byz. actors).
CreateVote(block *model.Block) (*model.Vote, error)
// CreateTimeout creates a timeout for given view. No errors return are
// expected during normal operations(incl presence of byz. actors).
CreateTimeout(curView uint64, newestQC *flow.QuorumCertificate, lastViewTC *flow.TimeoutCertificate) (*model.TimeoutObject, error)
}