block

package
v1.11.5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const CodecVersion = tx.CodecVersion

Variables

View Source
var Codec = tx.Codec

Functions

This section is empty.

Types

type Stateless

type Stateless struct {
	ParentID  ids.ID   `serialize:"true" json:"parentID"`
	Timestamp int64    `serialize:"true" json:"timestamp"`
	Height    uint64   `serialize:"true" json:"height"`
	Txs       []*tx.Tx `serialize:"true" json:"txs"`
}

Stateless blocks are blocks as they are marshalled/unmarshalled and sent over the p2p network. The stateful blocks which can be executed are built from Stateless blocks.

func Parse

func Parse(bytes []byte) (*Stateless, error)

func (*Stateless) ID

func (b *Stateless) ID() (ids.ID, error)

func (*Stateless) Time

func (b *Stateless) Time() time.Time

Jump to

Keyboard shortcuts

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