rewardTransaction

package
v1.0.67 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRewardTxProcessor

func NewRewardTxProcessor(
	accountsDB state.AccountsAdapter,
	adrConv state.AddressConverter,
	coordinator sharding.Coordinator,
	rewardTxForwarder process.IntermediateTransactionHandler,
) (*rewardTxProcessor, error)

NewRewardTxProcessor creates a rewardTxProcessor instance

Types

type InterceptedRewardTransaction

type InterceptedRewardTransaction struct {
	// contains filtered or unexported fields
}

InterceptedRewardTransaction holds and manages a transaction based struct with extended functionality

func NewInterceptedRewardTransaction

func NewInterceptedRewardTransaction(
	rewardTxBuff []byte,
	marshalizer marshal.Marshalizer,
	hasher hashing.Hasher,
	addrConv state.AddressConverter,
	coordinator sharding.Coordinator,
) (*InterceptedRewardTransaction, error)

NewInterceptedRewardTransaction returns a new instance of InterceptedRewardTransaction

func (*InterceptedRewardTransaction) CheckValidity

func (inRTx *InterceptedRewardTransaction) CheckValidity() error

CheckValidity checks if the received transaction is valid (not nil fields, valid sig and so on)

func (*InterceptedRewardTransaction) Hash

func (inRTx *InterceptedRewardTransaction) Hash() []byte

Hash gets the hash of this transaction

func (*InterceptedRewardTransaction) IsForCurrentShard

func (inRTx *InterceptedRewardTransaction) IsForCurrentShard() bool

IsForCurrentShard returns true if this transaction is meant to be processed by the node from this shard

func (*InterceptedRewardTransaction) IsInterfaceNil

func (inRTx *InterceptedRewardTransaction) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*InterceptedRewardTransaction) Nonce

func (inRTx *InterceptedRewardTransaction) Nonce() uint64

Nonce returns the transaction nonce

func (*InterceptedRewardTransaction) ReceiverShardId

func (inRTx *InterceptedRewardTransaction) ReceiverShardId() uint32

ReceiverShardId returns the receiver shard

func (*InterceptedRewardTransaction) SenderAddress

func (inRTx *InterceptedRewardTransaction) SenderAddress() state.AddressContainer

SenderAddress returns the transaction sender address

func (*InterceptedRewardTransaction) SenderShardId

func (inRTx *InterceptedRewardTransaction) SenderShardId() uint32

SenderShardId returns the sender shard

func (*InterceptedRewardTransaction) TotalValue added in v1.0.39

func (inRTx *InterceptedRewardTransaction) TotalValue() *big.Int

TotalValue returns the maximum cost of transaction totalValue = txValue + gasPrice*gasLimit

func (*InterceptedRewardTransaction) Transaction

Transaction returns the reward transaction pointer that actually holds the data

Jump to

Keyboard shortcuts

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