dev

package
v0.7.1-alpha2 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

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 added in v0.6.0

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 added in v0.4.0

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