dev

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WriteBlockSource = "dev"
)

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) IsSystemTransaction added in v1.2.0

func (d *Dev) IsSystemTransaction(height uint64, coinbase types.Address, tx *types.Transaction) bool

func (*Dev) PreStateCommit

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

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