Documentation ¶
Index ¶
- Variables
- func NewAPITransactionEvaluator(args ArgsApiTransactionEvaluator) (*apiTransactionEvaluator, error)
- func NewSimulationAccountsDB(accountsDB state.AccountsAdapter) (*simulationAccountsDB, error)
- func NewTransactionSimulator(args ArgsTxSimulator) (*transactionSimulator, error)
- type ArgsApiTransactionEvaluator
- type ArgsTxSimulator
- type DataFieldParser
- type TransactionProcessor
Constants ¶
This section is empty.
Variables ¶
var ErrNilAccountsAdapter = errors.New("trying to set nil accounts adapter")
ErrNilAccountsAdapter signals that a nil accounts adapter has been provided
var ErrNilCacher = errors.New("nil cacher")
ErrNilCacher signals that a nil cache has been provided
var ErrNilDataFieldParser = errors.New("nil data field parser")
ErrNilDataFieldParser signals that a nil data field parser has been provided
var ErrNilHasher = errors.New("nil hasher provided")
ErrNilHasher signals that a nil hasher has been provided
var ErrNilIntermediateProcessorContainer = errors.New("intermediate processor container is nil")
ErrNilIntermediateProcessorContainer signals that intermediate processors container is nil
var ErrNilMarshalizer = errors.New("nil marshalizer provided")
ErrNilMarshalizer signals that a nil marshalizer has been provided
var ErrNilPubkeyConverter = errors.New("trying to use a nil pubkey converter")
ErrNilPubkeyConverter signals that a nil public key converter has been provided
var ErrNilShardCoordinator = errors.New("trying to set nil shard coordinator")
ErrNilShardCoordinator signals that a nil shard coordinator has been provided
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 }
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 }
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