consensus

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: LGPL-3.0 Imports: 12 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 IsKnownBlock

func IsKnownBlock(err error) bool

IsKnownBlock returns if the error means the block was already in the chain.

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) (*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