txsimulator

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: 19 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 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 NewReadOnlyAccountsDB

func NewReadOnlyAccountsDB(accountsDB state.AccountsAdapter) (*readOnlyAccountsDB, error)

NewReadOnlyAccountsDB returns a new instance of readOnlyAccountsDB

func NewTransactionSimulator

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

NewTransactionSimulator returns a new instance of a transactionSimulator

Types

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
}

ArgsTxSimulator holds the arguments required for creating a new transaction simulator

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