consensus

package
v2.1.1-rc.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 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.

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

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

func (*Consensus) Process

func (c *Consensus) Process(parentSummary *chain.BlockSummary, 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