chain_index

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2019 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DBKP_BLOCK_LIST_BY_TOKEN = byte(1)

	DBKP_ACCOUNT_TOKEN_META = byte(2)

	DBKP_FILTER_TOKEN_CONSUME_ID = byte(3)

	DBKP_HEAD_HASH = byte(4)
)
View Source
const (
	STOP  = 1
	START = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain interface {
	GetLatestBlockEventId() (uint64, error)

	GetEvent(eventId uint64) (byte, []types.Hash, error)
	GetAccountBlockByHash(blockHash *types.Hash) (*ledger.AccountBlock, error)

	GetAccount(address *types.Address) (*ledger.Account, error)
	IsAccountBlockExisted(hash types.Hash) (bool, error)
	ChainDb() *chain_db.ChainDb
	IsGenesisAccountBlock(block *ledger.AccountBlock) bool
}

type FilterTokenIndex

type FilterTokenIndex struct {
	EventNumPerBatch uint64
	// contains filtered or unexported fields
}

func NewFilterTokenIndex

func NewFilterTokenIndex(cfg *config.Config, chainInstance Chain) (*FilterTokenIndex, error)

func (*FilterTokenIndex) GetBlockHashList

func (fti *FilterTokenIndex) GetBlockHashList(account *ledger.Account, originBlockHash *types.Hash, tokenTypeId types.TokenTypeId, count uint64) ([]types.Hash, error)

func (*FilterTokenIndex) Start

func (fti *FilterTokenIndex) Start()

func (*FilterTokenIndex) Stop

func (fti *FilterTokenIndex) Stop()

Jump to

Keyboard shortcuts

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