Documentation ¶
Index ¶
- func BlockCertificateSignBytes(blockHash hash.Hash, height uint32, round int16) []byte
- type BasicCheckError
- type Certificate
- func (cert *Certificate) Absentees() []int32
- func (cert *Certificate) AddSignature(valNum int32, sig *bls.Signature)
- func (cert *Certificate) BasicCheck() error
- func (cert *Certificate) Clone() *Certificate
- func (cert *Certificate) Committers() []int32
- func (cert *Certificate) Decode(r io.Reader) error
- func (cert *Certificate) Encode(w io.Writer) error
- func (cert *Certificate) Hash() hash.Hash
- func (cert *Certificate) Height() uint32
- func (cert *Certificate) MarshalCBOR() ([]byte, error)
- func (cert *Certificate) Round() int16
- func (cert *Certificate) SerializeSize() int
- func (cert *Certificate) Signature() *bls.Signature
- func (cert *Certificate) UnmarshalCBOR(bs []byte) error
- func (cert *Certificate) Validate(height uint32, validators []*validator.Validator, signBytes []byte) error
- type InsufficientPowerError
- type UnexpectedCommittersError
- type UnexpectedHeightError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BasicCheckError ¶
type BasicCheckError struct {
Reason string
}
BasicCheckError is returned when the basic check on the certificate fails.
func (BasicCheckError) Error ¶
func (e BasicCheckError) Error() string
type Certificate ¶
type Certificate struct {
// contains filtered or unexported fields
}
func NewCertificate ¶
func (*Certificate) Absentees ¶
func (cert *Certificate) Absentees() []int32
func (*Certificate) AddSignature ¶
func (cert *Certificate) AddSignature(valNum int32, sig *bls.Signature)
AddSignature adds a new signature to the certificate. It does not check the validity of the signature. The caller should ensure that the signature is valid.
func (*Certificate) BasicCheck ¶
func (cert *Certificate) BasicCheck() error
func (*Certificate) Clone ¶
func (cert *Certificate) Clone() *Certificate
func (*Certificate) Committers ¶
func (cert *Certificate) Committers() []int32
func (*Certificate) Hash ¶
func (cert *Certificate) Hash() hash.Hash
func (*Certificate) Height ¶
func (cert *Certificate) Height() uint32
func (*Certificate) MarshalCBOR ¶
func (cert *Certificate) MarshalCBOR() ([]byte, error)
func (*Certificate) Round ¶
func (cert *Certificate) Round() int16
func (*Certificate) SerializeSize ¶
func (cert *Certificate) SerializeSize() int
SerializeSize returns the number of bytes it would take to serialize the block.
func (*Certificate) Signature ¶
func (cert *Certificate) Signature() *bls.Signature
func (*Certificate) UnmarshalCBOR ¶
func (cert *Certificate) UnmarshalCBOR(bs []byte) error
type InsufficientPowerError ¶
InsufficientPowerError is returned when the accumulated power does not meet the required threshold.
func (InsufficientPowerError) Error ¶
func (e InsufficientPowerError) Error() string
type UnexpectedCommittersError ¶
type UnexpectedCommittersError struct {
Committers []int32
}
UnexpectedCommittersError is returned when the list of committers does not match the expectations.
func (UnexpectedCommittersError) Error ¶
func (e UnexpectedCommittersError) Error() string
func (UnexpectedCommittersError) Is ¶
func (e UnexpectedCommittersError) Is(target error) bool
type UnexpectedHeightError ¶
UnexpectedHeightError is returned when the height of the certificate is invalid.
func (UnexpectedHeightError) Error ¶
func (e UnexpectedHeightError) Error() string
Click to show internal directories.
Click to hide internal directories.