consensus

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: LGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCritical

func IsCritical(err error) bool

IsCritical returns if the error is consensus related.

func IsFutureBlock

func IsFutureBlock(err error) bool

IsFutureBlock returns if the error indicates that the block should be processed later.

func IsParentMissing

func IsParentMissing(err error) bool

IsParentMissing ...

Types

type Consensus

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

Consensus check whether the block is verified, and predicate which trunk it belong to.

func New

func New(repo *chain.Repository, stater *state.Stater, forkConfig thor.ForkConfig) *Consensus

New create a Consensus instance.

func (*Consensus) NewRuntimeForReplay added in v1.0.5

func (c *Consensus) NewRuntimeForReplay(header *block.Header, skipPoA bool) (*runtime.Runtime, error)

func (*Consensus) Process

func (c *Consensus) Process(blk *block.Block, nowTimestamp uint64, blockConflicts uint32) (*state.Stage, tx.Receipts, error)

Process process a block.

Jump to

Keyboard shortcuts

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