Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrActionIndexNA indicates action index is not supported ErrActionIndexNA = errors.New("action index not supported") )
Functions ¶
This section is empty.
Types ¶
type IndexBuilder ¶
type IndexBuilder struct {
// contains filtered or unexported fields
}
IndexBuilder defines the index builder
func NewIndexBuilder ¶
NewIndexBuilder instantiates an index builder
func (*IndexBuilder) Indexer ¶
func (ib *IndexBuilder) Indexer() Indexer
Indexer returns the indexer
func (*IndexBuilder) ReceiveBlock ¶
func (ib *IndexBuilder) ReceiveBlock(blk *block.Block) error
ReceiveBlock handles the block and create the indices for the actions and receipts in it
type Indexer ¶
type Indexer interface {
Start(context.Context) error
Stop(context.Context) error
PutBlock(context.Context, *block.Block) error
PutBlocks([]*block.Block) error
DeleteTipBlock(*block.Block) error
Height() (uint64, error)
GetBlockHash(height uint64) (hash.Hash256, error)
GetBlockHeight(hash hash.Hash256) (uint64, error)
GetBlockIndex(uint64) (*blockIndex, error)
GetActionIndex([]byte) (*actionIndex, error)
GetTotalActions() (uint64, error)
GetActionHashFromIndex(uint64, uint64) ([][]byte, error)
GetActionCountByAddress(hash.Hash160) (uint64, error)
GetActionsByAddress(hash.Hash160, uint64, uint64) ([][]byte, error)
}
Indexer is the interface for block indexer
Click to show internal directories.
Click to hide internal directories.