verifier

package
v2.10.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyAccount

func VerifyAccount(block *common.AccountStateBlock) bool

func VerifySnapshotHash

func VerifySnapshotHash(block *common.SnapshotBlock) bool

Types

type AccountBlockVerifyStat

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

func (*AccountBlockVerifyStat) ErrMsg

func (self *AccountBlockVerifyStat) ErrMsg() string

func (*AccountBlockVerifyStat) Reset

func (self *AccountBlockVerifyStat) Reset()

func (*AccountBlockVerifyStat) Task

func (self *AccountBlockVerifyStat) Task() Task

func (*AccountBlockVerifyStat) VerifyResult

func (self *AccountBlockVerifyStat) VerifyResult() VerifyResult

type AccountVerifier

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

func NewAccountVerifier

func NewAccountVerifier(r face.ChainReader, v *version.Version) *AccountVerifier

func (*AccountVerifier) VerifyReferred

func (acctV *AccountVerifier) VerifyReferred(b common.Block) BlockVerifyStat

type BlockVerifyStat

type BlockVerifyStat interface {
	VerifyResult() VerifyResult
	ErrMsg() string
	Task() Task
}

type Callback

type Callback func(block common.Block, stat BlockVerifyStat)

type SnapshotBlockVerifyStat

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

func (*SnapshotBlockVerifyStat) ErrMsg

func (self *SnapshotBlockVerifyStat) ErrMsg() string

func (*SnapshotBlockVerifyStat) Reset

func (self *SnapshotBlockVerifyStat) Reset()

func (*SnapshotBlockVerifyStat) Results

func (self *SnapshotBlockVerifyStat) Results() map[string]VerifyResult

func (*SnapshotBlockVerifyStat) Task

func (self *SnapshotBlockVerifyStat) Task() Task

func (*SnapshotBlockVerifyStat) VerifyResult

func (self *SnapshotBlockVerifyStat) VerifyResult() VerifyResult

type SnapshotVerifier

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

func NewSnapshotVerifier

func NewSnapshotVerifier(r face.ChainReader, v *version.Version) *SnapshotVerifier

func (*SnapshotVerifier) VerifyReferred

func (snapV *SnapshotVerifier) VerifyReferred(b common.Block) BlockVerifyStat

type Task

type Task interface {
	Done() bool
	Requests() []face.FetchRequest
}

func NewFailTask

func NewFailTask() Task

func NewSuccessTask

func NewSuccessTask() Task

type Verifier

type Verifier interface {
	VerifyReferred(block common.Block) BlockVerifyStat
}

type VerifyResult

type VerifyResult int
const (
	PENDING VerifyResult = iota
	FAIL
	SUCCESS
)

func (VerifyResult) Done

func (result VerifyResult) Done() bool

type VerifyType

type VerifyType int
const (
	VerifyReferred VerifyType = iota
)

Jump to

Keyboard shortcuts

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