dev

package
v0.0.0-...-696f417 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory(
	params *consensus.Params,
) (consensus.Consensus, error)

Factory implements the base factory method

Types

type Dev

type Dev struct {
	// contains filtered or unexported fields
}

Dev consensus protocol seals any new transaction immediately

func (*Dev) Close

func (d *Dev) Close() error

func (*Dev) GetBlockCreator

func (d *Dev) GetBlockCreator(header *types.Header) (types.Address, error)

func (*Dev) GetSyncProgression

func (d *Dev) GetSyncProgression() *progress.Progression

func (*Dev) Initialize

func (d *Dev) Initialize() error

Initialize initializes the consensus

func (*Dev) PreCommitState

func (d *Dev) PreCommitState(_header *types.Header, _txn *state.Transition) error

PreCommitState a hook to be called before finalizing state transition on inserting block

func (*Dev) ProcessHeaders

func (d *Dev) ProcessHeaders(headers []*types.Header) error

func (*Dev) Start

func (d *Dev) Start() error

Start starts the consensus mechanism

func (*Dev) VerifyHeader

func (d *Dev) VerifyHeader(header *types.Header) error

Jump to

Keyboard shortcuts

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