preprocess

package
v1.0.92 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2020 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGasComputation

func NewGasComputation(
	economicsFee process.FeeHandler,
) (*gasComputation, error)

NewGasComputation creates a new object which computes the gas consumption

func NewMiniBlocksCompaction added in v1.0.36

func NewMiniBlocksCompaction(
	economicsFee process.FeeHandler,
	shardCoordinator sharding.Coordinator,
	gasHandler process.GasHandler,
) (*miniBlocksCompaction, error)

NewMiniBlocksCompaction creates a new mini blocks compaction object

func NewRewardTxPreprocessor

func NewRewardTxPreprocessor(
	rewardTxDataPool dataRetriever.ShardedDataCacherNotifier,
	store dataRetriever.StorageService,
	hasher hashing.Hasher,
	marshalizer marshal.Marshalizer,
	rewardProcessor process.RewardTransactionProcessor,
	shardCoordinator sharding.Coordinator,
	onRequestRewardTransaction func(shardID uint32, txHashes [][]byte),
	gasHandler process.GasHandler,
) (*rewardTxPreprocessor, error)

NewRewardTxPreprocessor creates a new reward transaction preprocessor object

func NewSmartContractResultPreprocessor

func NewSmartContractResultPreprocessor(
	scrDataPool dataRetriever.ShardedDataCacherNotifier,
	store dataRetriever.StorageService,
	hasher hashing.Hasher,
	marshalizer marshal.Marshalizer,
	scrProcessor process.SmartContractResultProcessor,
	shardCoordinator sharding.Coordinator,
	accounts state.AccountsAdapter,
	onRequestSmartContractResult func(shardID uint32, txHashes [][]byte),
	gasHandler process.GasHandler,
	economicsFee process.FeeHandler,
) (*smartContractResults, error)

NewSmartContractResultPreprocessor creates a new smartContractResult preprocessor object

func NewTransactionPreprocessor

func NewTransactionPreprocessor(
	txDataPool dataRetriever.ShardedDataCacherNotifier,
	store dataRetriever.StorageService,
	hasher hashing.Hasher,
	marshalizer marshal.Marshalizer,
	txProcessor process.TransactionProcessor,
	shardCoordinator sharding.Coordinator,
	accounts state.AccountsAdapter,
	onRequestTransaction func(shardID uint32, txHashes [][]byte),
	economicsFee process.FeeHandler,
	miniBlocksCompacter process.MiniBlocksCompacter,
	gasHandler process.GasHandler,
	blockTracker BlockTracker,
	blockType block.Type,
) (*transactions, error)

NewTransactionPreprocessor creates a new transaction preprocessor object

Types

type BlockTracker

type BlockTracker interface {
	IsShardStuck(shardID uint32) bool
	IsInterfaceNil() bool
}

BlockTracker defines the functionality for node to track the blocks which are received from network

type SortedTransactionsProvider

type SortedTransactionsProvider interface {
	GetSortedTransactions() ([]data.TransactionHandler, [][]byte)
	IsInterfaceNil() bool
}

SortedTransactionsProvider defines the public API of the transactions cache

Jump to

Keyboard shortcuts

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