Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDataProcessor ¶
func NewDataProcessor( blockHandler BlockHandler, transactionHandler TransactionHandler, scHandler SCResultsHandler, receiptHandler ReceiptHandler, logHandler LogHandler, accountsHandler AccountsHandler, ) (*dataProcessor, error)
NewDataProcessor creates a new instance of data processor, which handles all sub-processes
Types ¶
type AccountsHandler ¶
type AccountsHandler interface { ProcessAccounts( processedTxs []*schema.Transaction, processedSCRs []*schema.SCResult, processedReceipts []*schema.Receipt) []*schema.AccountBalanceUpdate }
AccountsHandler defines what an account processor shall do
type BlockHandler ¶
type BlockHandler interface {
ProcessBlock(args *indexer.ArgsSaveBlockData) (*schema.Block, error)
}
BlockHandler defines what a block processor shall do
type LogHandler ¶
LogHandler defines what a log processor shall do
type MiniBlockHandler ¶
type MiniBlockHandler interface {
ProcessMiniBlocks(header data.HeaderHandler, body data.BodyHandler) ([]*schema.MiniBlock, error)
}
MiniBlockHandler defines what a mini blocks processor shall do
type ReceiptHandler ¶
type ReceiptHandler interface {
ProcessReceipts(receipts map[string]data.TransactionHandler, timeStamp uint64) []*schema.Receipt
}
ReceiptHandler defines what a receipt processor shall do
type SCResultsHandler ¶
type SCResultsHandler interface {
ProcessSCRs(transactions map[string]data.TransactionHandler, timeStamp uint64) []*schema.SCResult
}
SCResultsHandler defines what a smart contract processor shall do
type ShardCoordinator ¶
type ShardCoordinator interface { SelfId() uint32 ComputeId(address []byte) uint32 IsInterfaceNil() bool }
ShardCoordinator defines what a shard coordinator shall do
type TransactionHandler ¶
type TransactionHandler interface { ProcessTransactions( header data.HeaderHandler, headerHash []byte, bodyHandler data.BodyHandler, pool *indexer.Pool) ([]*schema.Transaction, error) }
TransactionHandler defines what a transaction processor shall do
Click to show internal directories.
Click to hide internal directories.