postprocess

package
v1.7.10 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFeeAccumulator

func NewFeeAccumulator() *feeHandler

NewFeeAccumulator constructor for the fee accumulator

func NewIntermediateResultsProcessor

func NewIntermediateResultsProcessor(
	args ArgsNewIntermediateResultsProcessor,
) (*intermediateResultsProcessor, error)

NewIntermediateResultsProcessor creates a new intermediate results processor

func NewOneMiniBlockPostProcessor

func NewOneMiniBlockPostProcessor(
	hasher hashing.Hasher,
	marshalizer marshal.Marshalizer,
	coordinator sharding.Coordinator,
	store dataRetriever.StorageService,
	blockType block.Type,
	storageType dataRetriever.UnitType,
	economicsFee process.FeeHandler,
) (*oneMBPostProcessor, error)

NewOneMiniBlockPostProcessor creates a new intermediate results processor

Types

type ArgsNewIntermediateResultsProcessor added in v1.6.0

type ArgsNewIntermediateResultsProcessor struct {
	Hasher                  hashing.Hasher
	Marshalizer             marshal.Marshalizer
	Coordinator             sharding.Coordinator
	PubkeyConv              core.PubkeyConverter
	Store                   dataRetriever.StorageService
	BlockType               block.Type
	CurrTxs                 dataRetriever.TransactionCacher
	EconomicsFee            process.FeeHandler
	EnableEpochsHandler     common.EnableEpochsHandler
	TxExecutionOrderHandler common.TxExecutionOrderHandler
}

ArgsNewIntermediateResultsProcessor defines the arguments needed for new smart contract processor

type TestIntermediateResProc

type TestIntermediateResProc struct {
	// contains filtered or unexported fields
}

TestIntermediateResProc extends intermediateResultsProcessor and is used in integration tests as it exposes some functions that are not supposed to be used in production code Exported functions simplify the reproduction of edge cases

func NewTestIntermediateResultsProcessor

func NewTestIntermediateResultsProcessor(
	args ArgsNewIntermediateResultsProcessor,
) (*TestIntermediateResProc, error)

NewTestIntermediateResultsProcessor creates a new instance of TestIntermediateResProc

func (TestIntermediateResProc) AddIntermediateTransactions

func (irp TestIntermediateResProc) AddIntermediateTransactions(txs []data.TransactionHandler) error

AddIntermediateTransactions adds smart contract results from smart contract processing for cross-shard calls

func (*TestIntermediateResProc) CleanIntermediateTransactions

func (tirp *TestIntermediateResProc) CleanIntermediateTransactions()

CleanIntermediateTransactions removes the intermediate transactions from the underlying map

func (TestIntermediateResProc) CreateAllInterMiniBlocks

func (irp TestIntermediateResProc) CreateAllInterMiniBlocks() []*block.MiniBlock

CreateAllInterMiniBlocks returns the miniblocks for the current round created from the smart contract results

func (*TestIntermediateResProc) GetIntermediateTransactions

func (tirp *TestIntermediateResProc) GetIntermediateTransactions() []data.TransactionHandler

GetIntermediateTransactions returns all the intermediate transactions from the underlying map

func (TestIntermediateResProc) GetNumOfCrossInterMbsAndTxs

func (irp TestIntermediateResProc) GetNumOfCrossInterMbsAndTxs() (int, int)

GetNumOfCrossInterMbsAndTxs returns the number of cross shard miniblocks and transactions for the current round, created from the smart contract results

func (TestIntermediateResProc) IsInterfaceNil

func (irp TestIntermediateResProc) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (TestIntermediateResProc) VerifyInterMiniBlocks

func (irp TestIntermediateResProc) VerifyInterMiniBlocks(body *block.Body) error

VerifyInterMiniBlocks verifies if the smart contract results added to the block are valid

Jump to

Keyboard shortcuts

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