unsigned

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterceptedUnsignedTransaction

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

InterceptedUnsignedTransaction holds and manages a transaction based struct with extended functionality

func NewInterceptedUnsignedTransaction

func NewInterceptedUnsignedTransaction(
	uTxBuff []byte,
	marshalizer marshal.Marshalizer,
	hasher hashing.Hasher,
	addrConv state.AddressConverter,
	coordinator sharding.Coordinator,
) (*InterceptedUnsignedTransaction, error)

NewInterceptedUnsignedTransaction returns a new instance of InterceptedUnsignedTransaction

func (*InterceptedUnsignedTransaction) Hash

func (inUTx *InterceptedUnsignedTransaction) Hash() []byte

Hash gets the hash of this transaction

func (*InterceptedUnsignedTransaction) IsAddressedToOtherShards added in v1.0.11

func (inUTx *InterceptedUnsignedTransaction) IsAddressedToOtherShards() bool

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

func (*InterceptedUnsignedTransaction) RcvShard added in v1.0.11

func (inUTx *InterceptedUnsignedTransaction) RcvShard() uint32

RcvShard returns the receiver shard

func (*InterceptedUnsignedTransaction) SndShard added in v1.0.11

func (inUTx *InterceptedUnsignedTransaction) SndShard() uint32

SndShard returns the sender shard

func (*InterceptedUnsignedTransaction) UnsignedTransaction added in v1.0.11

func (inUTx *InterceptedUnsignedTransaction) UnsignedTransaction() data.TransactionHandler

UnsignedTransaction returns the unsigned transaction pointer that actually holds the data

type UnsignedTxInterceptor added in v1.0.11

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

UnsignedTxInterceptor is used for intercepting unsigned transaction and storing them into a datapool

func NewUnsignedTxInterceptor added in v1.0.11

func NewUnsignedTxInterceptor(
	marshalizer marshal.Marshalizer,
	uTxPool dataRetriever.ShardedDataCacherNotifier,
	uTxStorer storage.Storer,
	addrConverter state.AddressConverter,
	hasher hashing.Hasher,
	shardCoordinator sharding.Coordinator,
) (*UnsignedTxInterceptor, error)

NewUnsignedTxInterceptor hooks a new interceptor for unsigned transactions

func (*UnsignedTxInterceptor) IsInterfaceNil added in v1.0.16

func (utxi *UnsignedTxInterceptor) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*UnsignedTxInterceptor) ProcessReceivedMessage added in v1.0.11

func (utxi *UnsignedTxInterceptor) 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 (*UnsignedTxInterceptor) SetBroadcastCallback added in v1.0.11

func (utxi *UnsignedTxInterceptor) 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