transactionEvaluator

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: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilAccountsAdapter = errors.New("trying to set nil accounts adapter")

ErrNilAccountsAdapter signals that a nil accounts adapter has been provided

View Source
var ErrNilCacher = errors.New("nil cacher")

ErrNilCacher signals that a nil cache has been provided

View Source
var ErrNilDataFieldParser = errors.New("nil data field parser")

ErrNilDataFieldParser signals that a nil data field parser has been provided

View Source
var ErrNilHasher = errors.New("nil hasher provided")

ErrNilHasher signals that a nil hasher has been provided

View Source
var ErrNilIntermediateProcessorContainer = errors.New("intermediate processor container is nil")

ErrNilIntermediateProcessorContainer signals that intermediate processors container is nil

View Source
var ErrNilMarshalizer = errors.New("nil marshalizer provided")

ErrNilMarshalizer signals that a nil marshalizer has been provided

View Source
var ErrNilPubkeyConverter = errors.New("trying to use a nil pubkey converter")

ErrNilPubkeyConverter signals that a nil public key converter has been provided

View Source
var ErrNilShardCoordinator = errors.New("trying to set nil shard coordinator")

ErrNilShardCoordinator signals that a nil shard coordinator has been provided

View Source
var ErrNilTxSimulatorProcessor = errors.New("nil transaction simulator processor")

ErrNilTxSimulatorProcessor signals that a nil transaction simulator processor has been provided

Functions

func NewAPITransactionEvaluator

func NewAPITransactionEvaluator(args ArgsApiTransactionEvaluator) (*apiTransactionEvaluator, error)

NewAPITransactionEvaluator will create a new api transaction evaluator

func NewSimulationAccountsDB

func NewSimulationAccountsDB(accountsDB state.AccountsAdapter) (*simulationAccountsDB, error)

NewSimulationAccountsDB returns a new instance of simulationAccountsDB

func NewTransactionSimulator

func NewTransactionSimulator(args ArgsTxSimulator) (*transactionSimulator, error)

NewTransactionSimulator returns a new instance of a transactionSimulator

Types

type ArgsApiTransactionEvaluator

type ArgsApiTransactionEvaluator struct {
	TxTypeHandler       process.TxTypeHandler
	FeeHandler          process.FeeHandler
	TxSimulator         facade.TransactionSimulatorProcessor
	Accounts            state.AccountsAdapterWithClean
	ShardCoordinator    sharding.Coordinator
	EnableEpochsHandler common.EnableEpochsHandler
	BlockChain          data.ChainHandler
}

ArgsApiTransactionEvaluator holds the arguments required for creating a new transaction evaluator

type ArgsTxSimulator

type ArgsTxSimulator struct {
	TransactionProcessor      TransactionProcessor
	IntermediateProcContainer process.IntermediateProcessorContainer
	AddressPubKeyConverter    core.PubkeyConverter
	ShardCoordinator          sharding.Coordinator
	VMOutputCacher            storage.Cacher
	Hasher                    hashing.Hasher
	Marshalizer               marshal.Marshalizer
	DataFieldParser           DataFieldParser
	BlockChainHook            process.BlockChainHookHandler
}

ArgsTxSimulator holds the arguments required for creating a new transaction simulator

type DataFieldParser

type DataFieldParser interface {
	Parse(dataField []byte, sender, receiver []byte, numOfShards uint32) *datafield.ResponseParseData
}

DataFieldParser defines what a data field parser should be able to do

type TransactionProcessor

type TransactionProcessor interface {
	ProcessTransaction(transaction *transaction.Transaction) (vmcommon.ReturnCode, error)
	VerifyTransaction(transaction *transaction.Transaction) error
	IsInterfaceNil() bool
}

TransactionProcessor defines the operations needed to be done by a transaction processor

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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