blocks

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0, MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockHeader

type BlockHeader struct {
	Height          int64  `pg:",pk,use_zero,notnull"`
	Cid             string `pg:",pk,notnull"`
	Miner           string `pg:",notnull"`
	ParentWeight    string `pg:",notnull"`
	ParentBaseFee   string `pg:",notnull"`
	ParentStateRoot string `pg:",notnull"`

	WinCount      int64  `pg:",use_zero"`
	Timestamp     uint64 `pg:",use_zero"`
	ForkSignaling uint64 `pg:",use_zero"`
}

func NewBlockHeader

func NewBlockHeader(bh *types.BlockHeader) *BlockHeader

func (*BlockHeader) Persist

type BlockHeaders

type BlockHeaders []*BlockHeader

func (BlockHeaders) Persist

type BlockParent

type BlockParent struct {
	Height int64  `pg:",pk,notnull,use_zero"`
	Block  string `pg:",pk,notnull"`
	Parent string `pg:",pk,notnull"`
}

func (*BlockParent) Persist

type BlockParents

type BlockParents []*BlockParent

func NewBlockParents

func NewBlockParents(header *types.BlockHeader) BlockParents

func (BlockParents) Persist

type DrandBlockEntrie

type DrandBlockEntrie struct {
	// Round is the round number of randomness used.
	Round uint64 `pg:",pk,use_zero"`
	// Block is the CID of the block.
	Block string `pg:",pk,notnull"`
}

DrandBlockEntrie contains Drand randomness round numbers used in each block.

func (*DrandBlockEntrie) Persist

type DrandBlockEntries

type DrandBlockEntries []*DrandBlockEntrie

func NewDrandBlockEntries

func NewDrandBlockEntries(header *types.BlockHeader) DrandBlockEntries

func (DrandBlockEntries) Persist

type UnsyncedBlockHeader added in v0.17.2

type UnsyncedBlockHeader struct {
	Height          int64  `pg:",pk,use_zero,notnull"`
	Cid             string `pg:",pk,notnull"`
	Miner           string `pg:",notnull"`
	ParentWeight    string `pg:",notnull"`
	ParentBaseFee   string `pg:",notnull"`
	ParentStateRoot string `pg:",notnull"`

	WinCount      int64  `pg:",use_zero"`
	Timestamp     uint64 `pg:",use_zero"`
	ForkSignaling uint64 `pg:",use_zero"`
	IsOrphan      bool   `pg:",notnull"`
}

func NewUnsyncedBlockHeader added in v0.17.2

func NewUnsyncedBlockHeader(bh *types.BlockHeader) *UnsyncedBlockHeader

func (*UnsyncedBlockHeader) Persist added in v0.17.2

type UnsyncedBlockHeaders added in v0.17.2

type UnsyncedBlockHeaders []*UnsyncedBlockHeader

func (UnsyncedBlockHeaders) Persist added in v0.17.2

Jump to

Keyboard shortcuts

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