blockAPI

package
v1.3.8-indexer1.2.14 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BlockStatusOnChain represents the identifier for an on-chain block
	BlockStatusOnChain = "on-chain"
	// BlockStatusReverted represent the identifier for a reverted block
	BlockStatusReverted = "reverted"
)

Variables

This section is empty.

Functions

func NewMetaApiBlockProcessor

func NewMetaApiBlockProcessor(arg *APIBlockProcessorArg) *metaAPIBlockProcessor

NewMetaApiBlockProcessor will create a new instance of meta api block processor

func NewShardApiBlockProcessor

func NewShardApiBlockProcessor(arg *APIBlockProcessorArg) *shardAPIBlockProcessor

NewShardApiBlockProcessor will create a new instance of shard api block processor

Types

type APIBlockHandler

type APIBlockHandler interface {
	GetBlockByNonce(nonce uint64, withTxs bool) (*api.Block, error)
	GetBlockByHash(hash []byte, withTxs bool) (*api.Block, error)
	GetBlockByRound(round uint64, withTxs bool) (*api.Block, error)
}

APIBlockHandler defines the behavior of a component able to return api blocks

type APIBlockProcessorArg

type APIBlockProcessorArg struct {
	SelfShardID              uint32
	Store                    dataRetriever.StorageService
	Marshalizer              marshal.Marshalizer
	Uint64ByteSliceConverter typeConverters.Uint64ByteSliceConverter
	HistoryRepo              dblookupext.HistoryRepository
	UnmarshalTx              func(txBytes []byte, txType transaction.TxType) (*transaction.ApiTransactionResult, error)
	StatusComputer           transaction.StatusComputerHandler
}

APIBlockProcessorArg is structure that store components that are needed to create an api block procesosr

type BlockStatus added in v1.1.28

type BlockStatus string

BlockStatus is the status of a block

Jump to

Keyboard shortcuts

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