process

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: MIT Imports: 20 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)
	//Rollback blocks until `hash' doesn't exist
	Rollback(hash types.Hash) error
}

type LedgerVerifier

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

func NewLedgerVerifier

func NewLedgerVerifier(l ledger.Store) *LedgerVerifier

func (*LedgerVerifier) BlockCacheCheck added in v1.3.0

func (lv *LedgerVerifier) BlockCacheCheck(block *types.StateBlock) (ProcessResult, error)

func (*LedgerVerifier) BlockCacheProcess added in v1.2.3

func (lv *LedgerVerifier) BlockCacheProcess(block *types.StateBlock) error

func (*LedgerVerifier) BlockCheck

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

func (*LedgerVerifier) BlockProcess

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

func (*LedgerVerifier) Process

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

func (*LedgerVerifier) Rollback added in v1.2.3

func (lv *LedgerVerifier) Rollback(hash types.Hash) error

func (*LedgerVerifier) RollbackCache added in v1.3.0

func (lv *LedgerVerifier) RollbackCache(hash types.Hash) error

func (*LedgerVerifier) RollbackUnchecked added in v1.3.1

func (lv *LedgerVerifier) RollbackUnchecked(hash types.Hash)

type ProcessResult

type ProcessResult byte
const (
	Progress ProcessResult = iota
	BadWork
	BadSignature
	BadHash
	BadMerkleRoot
	BadTarget
	BadStateHash
	BadCoinbase
	Old
	Fork
	GapPrevious
	GapSource
	GapSmartContract
	GapTransaction
	GapTokenInfo
	GapPovHeight
	GapPublish
	GapDoDSettleState
	BalanceMismatch
	UnReceivable
	InvalidData
	InvalidTime
	InvalidTxNum
	InvalidHeight
	InvalidTxOrder
	BadConsensus
	ReceiveRepeated
	BadAuxHeader
	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