postprocess

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFeeAccumulator

func NewFeeAccumulator() (*feeHandler, error)

NewFeeAccumulator constructor for the fee accumulator

func NewIntermediateResultsProcessor

func NewIntermediateResultsProcessor(
	hasher hashing.Hasher,
	marshalizer marshal.Marshalizer,
	coordinator sharding.Coordinator,
	pubkeyConv core.PubkeyConverter,
	store dataRetriever.StorageService,
	blockType block.Type,
	currTxs dataRetriever.TransactionCacher,
	economicsFee process.FeeHandler,
) (*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 TestIntermediateResProc added in v1.1.15

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 added in v1.1.15

func NewTestIntermediateResultsProcessor(
	hasher hashing.Hasher,
	marshalizer marshal.Marshalizer,
	coordinator sharding.Coordinator,
	pubkeyConv core.PubkeyConverter,
	store dataRetriever.StorageService,
	blockType block.Type,
	currTxs dataRetriever.TransactionCacher,
	economicsFee process.FeeHandler,
) (*TestIntermediateResProc, error)

NewTestIntermediateResultsProcessor creates a new instance of TestIntermediateResProc

func (TestIntermediateResProc) AddIntermediateTransactions added in v1.1.15

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

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

func (*TestIntermediateResProc) CleanIntermediateTransactions added in v1.1.15

func (tirp *TestIntermediateResProc) CleanIntermediateTransactions()

CleanIntermediateTransactions removes the intermediate transactions from the underlying map

func (TestIntermediateResProc) CreateAllInterMiniBlocks added in v1.1.15

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

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

func (*TestIntermediateResProc) GetIntermediateTransactions added in v1.1.15

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

GetIntermediateTransactions returns all the intermediate transactions from the underlying map

func (TestIntermediateResProc) GetNumOfCrossInterMbsAndTxs added in v1.1.15

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 added in v1.1.15

func (irp TestIntermediateResProc) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (TestIntermediateResProc) VerifyInterMiniBlocks added in v1.1.15

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