rewardTransaction

package
v1.0.25 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: GPL-3.0 Imports: 13 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) Hash

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

Hash gets the hash of this transaction

func (*InterceptedRewardTransaction) IsAddressedToOtherShards added in v1.0.20

func (inRTx *InterceptedRewardTransaction) IsAddressedToOtherShards() bool

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

func (*InterceptedRewardTransaction) RcvShard added in v1.0.20

func (inRTx *InterceptedRewardTransaction) RcvShard() uint32

RcvShard returns the receiver shard

func (*InterceptedRewardTransaction) RewardTransaction added in v1.0.20

func (inRTx *InterceptedRewardTransaction) RewardTransaction() data.TransactionHandler

RewardTransaction returns the reward transaction pointer that actually holds the data

func (*InterceptedRewardTransaction) SndShard added in v1.0.20

func (inRTx *InterceptedRewardTransaction) SndShard() uint32

SndShard returns the sender shard

type RewardTxInterceptor added in v1.0.20

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

RewardTxInterceptor is used for intercepting reward transactions and storing them into a datapool

func NewRewardTxInterceptor added in v1.0.20

func NewRewardTxInterceptor(
	marshalizer marshal.Marshalizer,
	rewardTxPool dataRetriever.ShardedDataCacherNotifier,
	rewardTxStorer storage.Storer,
	addrConverter state.AddressConverter,
	hasher hashing.Hasher,
	shardCoordinator sharding.Coordinator,
) (*RewardTxInterceptor, error)

NewRewardTxInterceptor hooks a new interceptor for reward transactions

func (*RewardTxInterceptor) IsInterfaceNil added in v1.0.20

func (rti *RewardTxInterceptor) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*RewardTxInterceptor) ProcessReceivedMessage added in v1.0.20

func (rti *RewardTxInterceptor) ProcessReceivedMessage(message p2p.MessageP2P) error

ProcessReceivedMessage will be the callback func from the p2p.Messenger and will be called each time a new message was received (for the topic this validator was registered to)

func (*RewardTxInterceptor) SetBroadcastCallback added in v1.0.20

func (rti *RewardTxInterceptor) SetBroadcastCallback(callback func(buffToSend []byte))

SetBroadcastCallback sets the callback method to send filtered out message

Jump to

Keyboard shortcuts

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