proposal

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSignature = errors.New("no signature")

ErrNoSignature is returned when the proposal has no signature.

Functions

func ChecKSignature added in v1.2.0

func ChecKSignature(blockHash hash.Hash, height uint32, round int16,
	sig *bls.Signature, pubKey *bls.PublicKey,
) error

func SignBytes added in v1.2.0

func SignBytes(blockHash hash.Hash, height uint32, round int16) []byte

Types

type BasicCheckError added in v1.5.0

type BasicCheckError struct {
	Reason string
}

BasicCheckError is returned when the basic check on the proposal fails.

func (BasicCheckError) Error added in v1.5.0

func (e BasicCheckError) Error() string

type Proposal

type Proposal struct {
	// contains filtered or unexported fields
}

func NewProposal

func NewProposal(height uint32, round int16, blk *block.Block) *Proposal

func (*Proposal) BasicCheck added in v0.15.0

func (p *Proposal) BasicCheck() error

func (*Proposal) Block

func (p *Proposal) Block() *block.Block

func (*Proposal) Hash

func (p *Proposal) Hash() hash.Hash

func (*Proposal) Height

func (p *Proposal) Height() uint32

func (*Proposal) IsForBlock

func (p *Proposal) IsForBlock(h hash.Hash) bool

func (*Proposal) MarshalCBOR

func (p *Proposal) MarshalCBOR() ([]byte, error)

func (*Proposal) Round

func (p *Proposal) Round() int16

func (*Proposal) SetSignature

func (p *Proposal) SetSignature(sig *bls.Signature)

func (*Proposal) SignBytes

func (p *Proposal) SignBytes() []byte

func (*Proposal) Signature

func (p *Proposal) Signature() *bls.Signature

func (Proposal) String added in v0.15.0

func (p Proposal) String() string

func (*Proposal) UnmarshalCBOR

func (p *Proposal) UnmarshalCBOR(bs []byte) error

func (*Proposal) Verify

func (p *Proposal) Verify(pubKey crypto.PublicKey) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL