consensus

package
v0.0.0-...-e4e12f0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 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 workshare.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(blk *block.Block, nowTimestamp uint64, blockConflicts uint32) (*state.Stage, tx.Receipts, error)

Process process a block.

Directories

Path Synopsis
gen
Package gen Code generated by go-bindata.
Package gen Code generated by go-bindata.
Package vrf provides optimized Secp256k1Sha256Tai functions.
Package vrf provides optimized Secp256k1Sha256Tai functions.

Jump to

Keyboard shortcuts

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