blockAPI

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

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) (*apiBlock.APIBlock, error)
	GetBlockByHash(hash []byte, withTxs bool) (*apiBlock.APIBlock, 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              fullHistory.HistoryRepository
	UnmarshalTx              func(txBytes []byte, txType string) (*transaction.ApiTransactionResult, error)
}

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

Jump to

Keyboard shortcuts

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