consensus

package
v0.0.0-...-33416f3 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidBlock = errors.New("invalid block")
	ErrOrphanBlock  = errors.New("orphan block")
)

Functions

This section is empty.

Types

type Engine

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

func NewEngine

func NewEngine() *Engine

func (*Engine) ValidateBlock

func (e *Engine) ValidateBlock(block *block.Block, prevBlock *block.Block) error

type Rules

type Rules struct {
	MaxBlockSize  uint32
	MinBlockTime  int64
	MaxBlockTime  int64
	MaxFutureTime int64
}

func NewRules

func NewRules() *Rules

func (*Rules) CheckBlockHeader

func (r *Rules) CheckBlockHeader(header *block.Header, prevHeader *block.Header) error

Jump to

Keyboard shortcuts

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