Help us shape the future of Go! Take the 2026 Go Developer Survey

block

package
v1.36.186 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stateless

type Stateless struct {
	ParentID  ids.ID   `json:"parentID"`
	Timestamp int64    `json:"timestamp"`
	Height    uint64   `json:"height"`
	Txs       []*tx.Tx `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) Marshal added in v1.36.3

func (b *Stateless) Marshal() ([]byte, error)

Marshal encodes the block as one native ZAP object.

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