interceptedBlocks

package
v1.0.84 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgInterceptedBlockHeader

type ArgInterceptedBlockHeader struct {
	HdrBuff           []byte
	Marshalizer       marshal.Marshalizer
	Hasher            hashing.Hasher
	ShardCoordinator  sharding.Coordinator
	HeaderSigVerifier process.InterceptedHeaderSigVerifier
	ChainID           []byte
	ValidityAttester  process.ValidityAttester
	EpochStartTrigger process.EpochStartTriggerHandler
}

ArgInterceptedBlockHeader is the argument for the intercepted header

type ArgInterceptedTxBlockBody

type ArgInterceptedTxBlockBody struct {
	TxBlockBodyBuff  []byte
	Marshalizer      marshal.Marshalizer
	Hasher           hashing.Hasher
	ShardCoordinator sharding.Coordinator
}

ArgInterceptedTxBlockBody is the argument for the intercepted transaction block body

type InterceptedHeader

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

InterceptedHeader represents the wrapper over HeaderWrapper struct. It implements Newer and Hashed interfaces

func NewInterceptedHeader

func NewInterceptedHeader(arg *ArgInterceptedBlockHeader) (*InterceptedHeader, error)

NewInterceptedHeader creates a new instance of InterceptedHeader struct

func (*InterceptedHeader) CheckValidity

func (inHdr *InterceptedHeader) CheckValidity() error

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

func (*InterceptedHeader) Hash

func (inHdr *InterceptedHeader) Hash() []byte

Hash gets the hash of this header

func (*InterceptedHeader) HeaderHandler

func (inHdr *InterceptedHeader) HeaderHandler() data.HeaderHandler

HeaderHandler returns the HeaderHandler pointer that holds the data

func (*InterceptedHeader) IsForCurrentShard

func (inHdr *InterceptedHeader) IsForCurrentShard() bool

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

func (*InterceptedHeader) IsInterfaceNil

func (inHdr *InterceptedHeader) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*InterceptedHeader) Type

func (inHdr *InterceptedHeader) Type() string

Type returns the type of this intercepted data

type InterceptedMetaHeader

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

InterceptedMetaHeader represents the wrapper over the meta block header struct

func NewInterceptedMetaHeader

func NewInterceptedMetaHeader(arg *ArgInterceptedBlockHeader) (*InterceptedMetaHeader, error)

NewInterceptedMetaHeader creates a new instance of InterceptedMetaHeader struct

func (*InterceptedMetaHeader) CheckValidity

func (imh *InterceptedMetaHeader) CheckValidity() error

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

func (*InterceptedMetaHeader) Hash

func (imh *InterceptedMetaHeader) Hash() []byte

Hash gets the hash of this header

func (*InterceptedMetaHeader) HeaderHandler

func (imh *InterceptedMetaHeader) HeaderHandler() data.HeaderHandler

HeaderHandler returns the MetaBlock pointer that holds the data

func (*InterceptedMetaHeader) IsForCurrentShard

func (imh *InterceptedMetaHeader) IsForCurrentShard() bool

IsForCurrentShard always returns true

func (*InterceptedMetaHeader) IsInterfaceNil

func (imh *InterceptedMetaHeader) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*InterceptedMetaHeader) Type

func (imh *InterceptedMetaHeader) Type() string

Type returns the type of this intercepted data

type InterceptedTxBlockBody

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

InterceptedTxBlockBody is a wrapper over a slice of miniblocks which contains transactions.

func NewInterceptedTxBlockBody

func NewInterceptedTxBlockBody(arg *ArgInterceptedTxBlockBody) (*InterceptedTxBlockBody, error)

NewInterceptedTxBlockBody creates a new instance of InterceptedTxBlockBody struct

func (*InterceptedTxBlockBody) CheckValidity

func (inTxBody *InterceptedTxBlockBody) CheckValidity() error

CheckValidity checks if the received tx block body is valid (not nil fields)

func (*InterceptedTxBlockBody) Hash

func (inTxBody *InterceptedTxBlockBody) Hash() []byte

Hash gets the hash of this transaction block body

func (*InterceptedTxBlockBody) IsForCurrentShard

func (inTxBody *InterceptedTxBlockBody) IsForCurrentShard() bool

IsForCurrentShard returns true if at least one contained miniblock is for current shard

func (*InterceptedTxBlockBody) IsInterfaceNil

func (inTxBody *InterceptedTxBlockBody) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*InterceptedTxBlockBody) TxBlockBody

func (inTxBody *InterceptedTxBlockBody) TxBlockBody() block.Body

TxBlockBody returns the block body held by this wrapper

func (*InterceptedTxBlockBody) Type

func (inTxBody *InterceptedTxBlockBody) 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