Documentation ¶
Index ¶
- func CertificateSignBytes(blockHash hash.Hash, round int16) []byte
- type Block
- func (b *Block) Bytes() ([]byte, error)
- func (b *Block) Decode(r io.Reader) error
- func (b *Block) Encode(w io.Writer) error
- func (b *Block) Fingerprint() string
- func (b *Block) Hash() hash.Hash
- func (b *Block) Header() *Header
- func (b *Block) MarshalCBOR() ([]byte, error)
- func (b *Block) PrevCertificate() *Certificate
- func (b *Block) SanityCheck() error
- func (b *Block) SerializeSize() int
- func (b *Block) Stamp() hash.Stamp
- func (b *Block) Transactions() Txs
- func (b *Block) UnmarshalCBOR(bs []byte) error
- type Certificate
- func (cert *Certificate) Absentees() []int32
- 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) MarshalCBOR() ([]byte, error)
- func (cert *Certificate) Round() int16
- func (cert *Certificate) SanityCheck() error
- func (cert *Certificate) SerializeSize() int
- func (cert *Certificate) Signature() *bls.Signature
- func (cert *Certificate) UnmarshalCBOR(bs []byte) error
- type Header
- func (h *Header) Decode(r io.Reader) error
- func (h *Header) Encode(w io.Writer) error
- func (h *Header) PrevBlockHash() hash.Hash
- func (h *Header) ProposerAddress() crypto.Address
- func (h *Header) SanityCheck() error
- func (h *Header) SerializeSize() int
- func (h *Header) SortitionSeed() sortition.VerifiableSeed
- func (h *Header) StateRoot() hash.Hash
- func (h *Header) Time() time.Time
- func (h *Header) UnixTime() uint32
- func (h *Header) Version() uint8
- type Txs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
func GenerateTestBlock ¶
GenerateTestBlock generates a block vote for testing.
func (*Block) Bytes ¶
Bytes returns the serialized bytes for the Block. It caches the result so subsequent calls are more efficient.
func (*Block) Fingerprint ¶
func (*Block) MarshalCBOR ¶
func (*Block) PrevCertificate ¶
func (b *Block) PrevCertificate() *Certificate
func (*Block) SanityCheck ¶
func (*Block) SerializeSize ¶
SerializeSize returns the number of bytes it would take to serialize the block.
func (*Block) Transactions ¶
func (*Block) UnmarshalCBOR ¶
type Certificate ¶
type Certificate struct {
// contains filtered or unexported fields
}
func GenerateTestCertificate ¶
func GenerateTestCertificate(blockHash hash.Hash) *Certificate
func NewCertificate ¶
func NewCertificate(round int16, committers, absentees []int32, signature *bls.Signature) *Certificate
func (*Certificate) Absentees ¶
func (cert *Certificate) Absentees() []int32
func (*Certificate) Committers ¶
func (cert *Certificate) Committers() []int32
func (*Certificate) Encode ¶
func (cert *Certificate) Encode(w io.Writer) error
Encode encodes the receiver to w.
func (*Certificate) Hash ¶
func (cert *Certificate) Hash() hash.Hash
func (*Certificate) MarshalCBOR ¶
func (cert *Certificate) MarshalCBOR() ([]byte, error)
func (*Certificate) Round ¶
func (cert *Certificate) Round() int16
func (*Certificate) SanityCheck ¶
func (cert *Certificate) SanityCheck() error
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 Header ¶
type Header struct {
// contains filtered or unexported fields
}
func (*Header) PrevBlockHash ¶
PrevBlockHash returns the previous block hash
func (*Header) ProposerAddress ¶
ProposerAddress returns the proposer address
func (*Header) SanityCheck ¶
func (*Header) SerializeSize ¶
SerializeSize returns the number of bytes it would take to serialize the header.
func (*Header) SortitionSeed ¶
func (h *Header) SortitionSeed() sortition.VerifiableSeed
SortitionSeed returns the sortition seed
Click to show internal directories.
Click to hide internal directories.