protocol

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: LGPL-3.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainDB

type ChainDB interface {
	SizeOfValue(hash common.Hash) (int, error)

	SetBlock(hash common.Hash, block *types.Block) error
	GetBlockByHeight(height uint32) (*types.Block, error)
	GetBlockByHash(hash common.Hash) (*types.Block, error)
	IsExistByHash(hash common.Hash) (bool, error)
	GetUnConfirmByHeight(height uint32, leafBlockHash common.Hash) (*types.Block, error)
	IterateUnConfirms(fn func(*types.Block))

	GetConfirms(hash common.Hash) ([]types.SignData, error)
	SetConfirms(hash common.Hash, pack []types.SignData) (*types.Block, error)

	LoadLatestBlock() (*types.Block, error)
	SetStableBlock(hash common.Hash) ([]*types.Block, error)

	GetAccount(addr common.Address) (*types.AccountData, error)

	GetTrieDatabase() *store.TrieDatabase
	GetActDatabase(hash common.Hash) (*store.AccountTrieDB, error)

	GetContractCode(hash common.Hash) (types.Code, error)
	SetContractCode(hash common.Hash, code types.Code) error

	CandidatesRanking(hash common.Hash, voteLogs types.ChangeLogSlice)
	GetCandidatesTop(hash common.Hash) []*store.Candidate
	GetAllCandidates() ([]common.Address, error)

	GetAssetID(id common.Hash) (common.Address, error)
	GetAssetCode(code common.Hash) (common.Address, error)

	SerializeForks(currentHash common.Hash) string

	Close() error
}

Jump to

Keyboard shortcuts

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