dev

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory(
	params *consensus.ConsensusParams,
) (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) PreStateCommit added in v0.3.0

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

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

func (*Dev) Prepare

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

func (*Dev) ProcessHeaders added in v0.4.0

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

func (*Dev) Seal

func (d *Dev) Seal(block *types.Block, ctx context.Context) (*types.Block, 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