face

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: 2 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountReader

type AccountReader interface {
	HeadAccount(address common.Address) (*common.AccountStateBlock, error)
	GetAccountByHashH(address common.Address, hashH common.HashHeight) *common.AccountStateBlock
	GetAccountByHash(address common.Address, hash common.Hash) *common.AccountStateBlock
	GetAccountByHeight(address common.Address, height common.Height) *common.AccountStateBlock

	GetAccountByFromHash(address common.Address, source common.Hash) *common.AccountStateBlock
	NextAccountSnapshot() (common.HashHeight, []*common.AccountHashH, error)
}

type AccountWriter

type AccountWriter interface {
	InsertAccountBlock(address common.Address, block *common.AccountStateBlock) error
	RollbackAccountBlockTo(address common.Address, height common.Height) ([]*common.AccountStateBlock, error)
}

type ChainListener

type ChainListener interface {
	SnapshotInsertCallback(block *common.SnapshotBlock)
	SnapshotRemoveCallback(block *common.SnapshotBlock)
	AccountInsertCallback(address common.Address, block *common.AccountStateBlock)
	AccountRemoveCallback(address common.Address, block *common.AccountStateBlock)
}

type ChainReader

type ChainReader interface {
	SnapshotReader
	AccountReader
}

type FetchRequest

type FetchRequest struct {
	Chain   *common.Address
	Height  common.Height
	Hash    common.Hash
	PrevCnt uint64
}

func (*FetchRequest) String

func (req *FetchRequest) String() string

type PoolReader

type PoolReader interface {
	ExistInPool(address common.Address, requestHash common.Hash) bool // request对应的response是否在current链上
}

type PoolWriter

type PoolWriter interface {
	AddSnapshotBlock(block *common.SnapshotBlock) error
	AddDirectSnapshotBlock(block *common.SnapshotBlock) error

	AddAccountBlock(address common.Address, block *common.AccountStateBlock) error
	AddDirectAccountBlock(address common.Address, block *common.AccountStateBlock) error
}

type SnapshotReader

type SnapshotReader interface {
	GenesisSnapshot() (*common.SnapshotBlock, error)
	HeadSnapshot() (*common.SnapshotBlock, error)
	GetSnapshotByHashH(hashH common.HashHeight) *common.SnapshotBlock
	GetSnapshotByHash(hash common.Hash) *common.SnapshotBlock
	GetSnapshotByHeight(height common.Height) *common.SnapshotBlock
}

type SnapshotWriter

type SnapshotWriter interface {
	InsertSnapshotBlock(block *common.SnapshotBlock) error
	RollbackSnapshotBlockTo(height common.Height) ([]*common.SnapshotBlock, map[common.Address][]*common.AccountStateBlock, error)
}

type SyncStatus

type SyncStatus interface {
	Done() bool
}

Jump to

Keyboard shortcuts

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