Documentation ¶
Index ¶
- func NewMetaTxProcessor(hasher hashing.Hasher, marshalizer marshal.Marshalizer, ...) (*metaTxProcessor, error)
- func NewTransactionCostEstimator(txTypeHandler process.TxTypeHandler, feeHandler process.FeeHandler, ...) (*transactionCostEstimator, error)
- func NewTxProcessor(accounts state.AccountsAdapter, hasher hashing.Hasher, ...) (*txProcessor, error)
- type InterceptedTransaction
- func (inTx *InterceptedTransaction) CheckValidity() error
- func (inTx *InterceptedTransaction) Fee() *big.Int
- func (inTx *InterceptedTransaction) Hash() []byte
- func (inTx *InterceptedTransaction) Identifiers() [][]byte
- func (inTx *InterceptedTransaction) IsForCurrentShard() bool
- func (inTx *InterceptedTransaction) IsInterfaceNil() bool
- func (inTx *InterceptedTransaction) Nonce() uint64
- func (inTx *InterceptedTransaction) ReceiverShardId() uint32
- func (inTx *InterceptedTransaction) SenderAddress() []byte
- func (inTx *InterceptedTransaction) SenderShardId() uint32
- func (inTx *InterceptedTransaction) String() string
- func (inTx *InterceptedTransaction) Transaction() data.TransactionHandler
- func (inTx *InterceptedTransaction) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMetaTxProcessor ¶
func NewMetaTxProcessor( hasher hashing.Hasher, marshalizer marshal.Marshalizer, accounts state.AccountsAdapter, pubkeyConv core.PubkeyConverter, shardCoordinator sharding.Coordinator, scProcessor process.SmartContractProcessor, txTypeHandler process.TxTypeHandler, economicsFee process.FeeHandler, ) (*metaTxProcessor, error)
NewMetaTxProcessor creates a new txProcessor engine
func NewTransactionCostEstimator ¶
func NewTransactionCostEstimator( txTypeHandler process.TxTypeHandler, feeHandler process.FeeHandler, query external.SCQueryService, gasSchedule map[string]map[string]uint64, ) (*transactionCostEstimator, error)
NewTransactionCostEstimator will create a new transaction cost estimator
func NewTxProcessor ¶
func NewTxProcessor( accounts state.AccountsAdapter, hasher hashing.Hasher, pubkeyConv core.PubkeyConverter, marshalizer marshal.Marshalizer, signMarshalizer marshal.Marshalizer, shardCoordinator sharding.Coordinator, scProcessor process.SmartContractProcessor, txFeeHandler process.TransactionFeeHandler, txTypeHandler process.TxTypeHandler, economicsFee process.FeeHandler, receiptForwarder process.IntermediateTransactionHandler, badTxForwarder process.IntermediateTransactionHandler, argsParser process.ArgumentsParser, scrForwarder process.IntermediateTransactionHandler, ) (*txProcessor, error)
NewTxProcessor creates a new txProcessor engine
Types ¶
type InterceptedTransaction ¶
type InterceptedTransaction struct {
// contains filtered or unexported fields
}
InterceptedTransaction holds and manages a transaction based struct with extended functionality
func NewInterceptedTransaction ¶
func NewInterceptedTransaction( txBuff []byte, protoMarshalizer marshal.Marshalizer, signMarshalizer marshal.Marshalizer, hasher hashing.Hasher, keyGen crypto.KeyGenerator, signer crypto.SingleSigner, pubkeyConv core.PubkeyConverter, coordinator sharding.Coordinator, feeHandler process.FeeHandler, whiteListerVerifiedTxs process.WhiteListHandler, argsParser process.ArgumentsParser, chainID []byte, minTxVersion uint32, ) (*InterceptedTransaction, error)
NewInterceptedTransaction returns a new instance of InterceptedTransaction
func (*InterceptedTransaction) CheckValidity ¶
func (inTx *InterceptedTransaction) CheckValidity() error
CheckValidity checks if the received transaction is valid (not nil fields, valid sig and so on)
func (*InterceptedTransaction) Fee ¶
func (inTx *InterceptedTransaction) Fee() *big.Int
Fee returns the estimated cost of the transaction
func (*InterceptedTransaction) Hash ¶
func (inTx *InterceptedTransaction) Hash() []byte
Hash gets the hash of this transaction
func (*InterceptedTransaction) Identifiers ¶ added in v1.0.110
func (inTx *InterceptedTransaction) Identifiers() [][]byte
Identifiers returns the identifiers used in requests
func (*InterceptedTransaction) IsForCurrentShard ¶
func (inTx *InterceptedTransaction) IsForCurrentShard() bool
IsForCurrentShard returns true if this transaction is meant to be processed by the node from this shard
func (*InterceptedTransaction) IsInterfaceNil ¶
func (inTx *InterceptedTransaction) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*InterceptedTransaction) Nonce ¶
func (inTx *InterceptedTransaction) Nonce() uint64
Nonce returns the transaction nonce
func (*InterceptedTransaction) ReceiverShardId ¶
func (inTx *InterceptedTransaction) ReceiverShardId() uint32
ReceiverShardId returns the receiver shard id
func (*InterceptedTransaction) SenderAddress ¶
func (inTx *InterceptedTransaction) SenderAddress() []byte
SenderAddress returns the transaction sender address
func (*InterceptedTransaction) SenderShardId ¶
func (inTx *InterceptedTransaction) SenderShardId() uint32
SenderShardId returns the transaction sender shard id
func (*InterceptedTransaction) String ¶ added in v0.0.5
func (inTx *InterceptedTransaction) String() string
String returns the transaction's most important fields as string
func (*InterceptedTransaction) Transaction ¶
func (inTx *InterceptedTransaction) Transaction() data.TransactionHandler
Transaction returns the transaction pointer that actually holds the data
func (*InterceptedTransaction) Type ¶
func (inTx *InterceptedTransaction) Type() string
Type returns the type of this intercepted data