Documentation ¶
Index ¶
- Constants
- type Type
- type Vote
- func GenerateTestChangeProposerVote(height uint32, round int16) (*Vote, crypto.Signer)
- func GenerateTestPrecommitVote(height uint32, round int16) (*Vote, crypto.Signer)
- func GenerateTestPrepareVote(height uint32, round int16) (*Vote, crypto.Signer)
- func NewVote(voteType Type, height uint32, round int16, blockHash hash.Hash, ...) *Vote
- func (v *Vote) BlockHash() hash.Hash
- func (v *Vote) Fingerprint() string
- func (v *Vote) Hash() hash.Hash
- func (v *Vote) Height() uint32
- func (v *Vote) MarshalCBOR() ([]byte, error)
- func (v *Vote) Round() int16
- func (v *Vote) SanityCheck() error
- func (v *Vote) SetPublicKey(crypto.PublicKey)
- func (v *Vote) SetSignature(sig crypto.Signature)
- func (v *Vote) SignBytes() []byte
- func (v *Vote) Signature() *bls.Signature
- func (v *Vote) Signer() crypto.Address
- func (v *Vote) Type() Type
- func (v *Vote) UnmarshalCBOR(bs []byte) error
- func (v *Vote) Verify(pubKey *bls.PublicKey) error
Constants ¶
View Source
const ( VoteTypePrepare = Type(1) VoteTypePrecommit = Type(2) VoteTypeChangeProposer = Type(3) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Vote ¶
type Vote struct {
// contains filtered or unexported fields
}
Vote represents a prepare, precommit, or commit vote from validators for consensus.
func GenerateTestChangeProposerVote ¶
GenerateTestChangeProposerVote generates a proposer-change vote for testing.
func GenerateTestPrecommitVote ¶
GenerateTestPrecommitVote generates a precommit vote for testing.
func GenerateTestPrepareVote ¶
GenerateTestPrepareVote generates a prepare vote for testing.
func (*Vote) Fingerprint ¶
func (*Vote) MarshalCBOR ¶
func (*Vote) SanityCheck ¶
func (*Vote) SetPublicKey ¶
SetPublicKey is doing nothing and just satisfies SignableMsg interface.
func (*Vote) SetSignature ¶
func (*Vote) UnmarshalCBOR ¶
Click to show internal directories.
Click to hide internal directories.