Documentation ¶
Index ¶
- func NewRewardTxProcessor(accountsDB state.AccountsAdapter, adrConv state.AddressConverter, ...) (*rewardTxProcessor, error)
- type InterceptedRewardTransaction
- func (inRTx *InterceptedRewardTransaction) Hash() []byte
- func (inRTx *InterceptedRewardTransaction) IsAddressedToOtherShards() bool
- func (inRTx *InterceptedRewardTransaction) RcvShard() uint32
- func (inRTx *InterceptedRewardTransaction) RewardTransaction() data.TransactionHandler
- func (inRTx *InterceptedRewardTransaction) SndShard() uint32
- type RewardTxInterceptor
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