process

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockVerifier

type BlockVerifier interface {
	//BlockCheck check block valid
	BlockCheck(block types.Block) (ProcessResult, error)
	//Process check block and process block to badger
	Process(block types.Block) (ProcessResult, error)
}

type LedgerVerifier

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

func NewLedgerVerifier

func NewLedgerVerifier(l *ledger.Ledger) *LedgerVerifier

func (*LedgerVerifier) BlockCheck

func (lv *LedgerVerifier) BlockCheck(block types.Block) (ProcessResult, error)

func (*LedgerVerifier) BlockProcess

func (lv *LedgerVerifier) BlockProcess(block types.Block) error

func (*LedgerVerifier) Process

func (lv *LedgerVerifier) Process(block types.Block) (ProcessResult, error)

type ProcessResult

type ProcessResult byte
const (
	Progress ProcessResult = iota
	BadWork
	BadSignature
	Old
	Fork
	GapPrevious
	GapSource
	GapSmartContract
	BalanceMismatch
	UnReceivable
	InvalidData
	Other
)

func (ProcessResult) String

func (r ProcessResult) String() string

Jump to

Keyboard shortcuts

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