transaction

package
v1.0.88 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMetaTxProcessor

func NewMetaTxProcessor(
	accounts state.AccountsAdapter,
	addressConv state.AddressConverter,
	shardCoordinator sharding.Coordinator,
	scProcessor process.SmartContractProcessor,
	txTypeHandler process.TxTypeHandler,
	economicsFee process.FeeHandler,
) (*metaTxProcessor, error)

NewMetaTxProcessor creates a new txProcessor engine

func NewTxProcessor

func NewTxProcessor(
	accounts state.AccountsAdapter,
	hasher hashing.Hasher,
	addressConv state.AddressConverter,
	marshalizer marshal.Marshalizer,
	shardCoordinator sharding.Coordinator,
	scProcessor process.SmartContractProcessor,
	txFeeHandler process.TransactionFeeHandler,
	txTypeHandler process.TxTypeHandler,
	economicsFee process.FeeHandler,
	receiptForwarder process.IntermediateTransactionHandler,
	badTxForwarder 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,
	marshalizer marshal.Marshalizer,
	hasher hashing.Hasher,
	keyGen crypto.KeyGenerator,
	signer crypto.SingleSigner,
	addrConv state.AddressConverter,
	coordinator sharding.Coordinator,
	feeHandler process.FeeHandler,
) (*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) 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() state.AddressContainer

SenderAddress returns the transaction sender address

func (*InterceptedTransaction) SenderShardId

func (inTx *InterceptedTransaction) SenderShardId() uint32

SenderShardId returns the transaction sender shard id

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

Jump to

Keyboard shortcuts

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