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) }
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) }
APIBlockProcessorArg is structure that store components that are needed to create an api block procesosr
Click to show internal directories.
Click to hide internal directories.