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

blockfactory

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Factories corresponding to well-known chain configurations.

Functions

func NewTestHeader

func NewTestHeader() *block.Header

NewTestHeader creates a new, empty header object for epoch 0 using the test factory. Use for unit tests.

Types

type Factory

type Factory interface {
	// NewHeader creates a new, empty header object for the given epoch.
	NewHeader(epoch *big.Int) *block.Header
}

Factory is a data structure factory for a specific chain configuration.

func NewFactory

func NewFactory(chainConfig *params.ChainConfig) Factory

NewFactory creates a new factory for the given chain configuration.

Jump to

Keyboard shortcuts

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