basiccheck

package
v0.0.0-...-59e56fa Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSigMalformed   = errors.New("event signature malformed")
	ErrVersion        = errors.New("event has wrong version")
	ErrExtraTooLarge  = errors.New("event extra is too big")
	ErrNoParents      = errors.New("event has no parents")
	ErrTooManyParents = errors.New("event has too many parents")
	ErrTooBigGasUsed  = errors.New("event uses too much gas power")
	ErrWrongGasUsed   = errors.New("event has incorrect gas power")
	ErrIntrinsicGas   = errors.New("intrinsic gas too low")
	ErrUnderpriced    = errors.New("event transaction underpriced")
	ErrNotInited      = errors.New("event field is not initialized")
	ErrZeroTime       = errors.New("event has zero timestamp")
	ErrNegativeValue  = errors.New("negative value")
	ErrHugeValue      = errors.New("too big value")
)

Functions

func CalcGasPowerUsed

func CalcGasPowerUsed(e *inter.Event, config *lachesis.DagConfig) uint64

Types

type Checker

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

func New

func New(config *lachesis.DagConfig) *Checker

New validator which performs checks which don't require anything except event

func (*Checker) Validate

func (v *Checker) Validate(e *inter.Event) error

Validate event

Jump to

Keyboard shortcuts

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