block

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMetaProcessor

func NewMetaProcessor(
	core serviceContainer.Core,
	accounts state.AccountsAdapter,
	dataPool dataRetriever.MetaPoolsHolder,
	forkDetector process.ForkDetector,
	shardCoordinator sharding.Coordinator,
	hasher hashing.Hasher,
	marshalizer marshal.Marshalizer,
	store dataRetriever.StorageService,
	startHeaders map[uint32]data.HeaderHandler,
	requestHandler process.RequestHandler,
	uint64Converter typeConverters.Uint64ByteSliceConverter,
) (*metaProcessor, error)

NewMetaProcessor creates a new metaProcessor object

func NewShardProcessor

func NewShardProcessor(
	core serviceContainer.Core,
	dataPool dataRetriever.PoolsHolder,
	store dataRetriever.StorageService,
	hasher hashing.Hasher,
	marshalizer marshal.Marshalizer,
	accounts state.AccountsAdapter,
	shardCoordinator sharding.Coordinator,
	forkDetector process.ForkDetector,
	blocksTracker process.BlocksTracker,
	startHeaders map[uint32]data.HeaderHandler,
	metaChainActive bool,
	requestHandler process.RequestHandler,
	txCoordinator process.TransactionCoordinator,
	uint64Converter typeConverters.Uint64ByteSliceConverter,
) (*shardProcessor, error)

NewShardProcessor creates a new shardProcessor object

func NewTransactionCounter

func NewTransactionCounter() *transactionCounter

NewTransactionCounter returns a new object that keeps track of how many transactions were executed in total, and in the current block

Types

type InterceptedHeader added in v1.0.3

type InterceptedHeader struct {
	*block.Header
	// contains filtered or unexported fields
}

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

func NewInterceptedHeader added in v1.0.3

func NewInterceptedHeader(
	multiSigVerifier crypto.MultiSigVerifier,
	chronologyValidator process.ChronologyValidator,
) *InterceptedHeader

NewInterceptedHeader creates a new instance of InterceptedHeader struct

func (*InterceptedHeader) GetHeader added in v1.0.3

func (inHdr *InterceptedHeader) GetHeader() *block.Header

GetShardHeader returns the Header pointer that holds the data

func (*InterceptedHeader) GetUnderlyingObject added in v1.0.3

func (inHdr *InterceptedHeader) GetUnderlyingObject() interface{}

GetUnderlyingObject returns the underlying object

func (*InterceptedHeader) Hash added in v1.0.3

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

Hash gets the hash of this header

func (*InterceptedHeader) Integrity added in v1.0.3

func (inHdr *InterceptedHeader) Integrity(coordinator sharding.Coordinator) error

Integrity checks the integrity of the state block wrapper

func (*InterceptedHeader) IntegrityAndValidity added in v1.0.3

func (inHdr *InterceptedHeader) IntegrityAndValidity(coordinator sharding.Coordinator) error

IntegrityAndValidity checks the integrity and validity of a block header wrapper

func (*InterceptedHeader) IsInterfaceNil added in v1.0.3

func (mb *InterceptedHeader) IsInterfaceNil() bool

IsInterfaceNil return if there is no value under the interface

func (*InterceptedHeader) SetHash added in v1.0.3

func (inHdr *InterceptedHeader) SetHash(hash []byte)

SetHash sets the hash of this header. The hash will also be the ID of this object

func (*InterceptedHeader) Shard added in v1.0.3

func (inHdr *InterceptedHeader) Shard() uint32

Shard returns the shard ID for which this header is addressed

func (*InterceptedHeader) VerifySig added in v1.0.3

func (inHdr *InterceptedHeader) VerifySig() error

VerifySig verifies a signature

type InterceptedMetaHeader added in v1.0.3

type InterceptedMetaHeader struct {
	*block.MetaBlock
	// contains filtered or unexported fields
}

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

func NewInterceptedMetaHeader added in v1.0.3

func NewInterceptedMetaHeader(
	multiSigVerifier crypto.MultiSigVerifier,
	chronologyValidator process.ChronologyValidator,
) *InterceptedMetaHeader

NewInterceptedHeader creates a new instance of InterceptedHeader struct

func (*InterceptedMetaHeader) GetMetaHeader added in v1.0.3

func (imh *InterceptedMetaHeader) GetMetaHeader() *block.MetaBlock

GetMetaHeader returns the MetaBlock pointer that holds the data

func (*InterceptedMetaHeader) Hash added in v1.0.3

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

Hash gets the hash of this header

func (*InterceptedMetaHeader) Integrity added in v1.0.3

func (imh *InterceptedMetaHeader) Integrity(coordinator sharding.Coordinator) error

Integrity checks the integrity of the state block wrapper

func (*InterceptedMetaHeader) IntegrityAndValidity added in v1.0.3

func (imh *InterceptedMetaHeader) IntegrityAndValidity(coordinator sharding.Coordinator) error

IntegrityAndValidity checks the integrity and validity of a block header wrapper

func (*InterceptedMetaHeader) IsInterfaceNil added in v1.0.3

func (mb *InterceptedMetaHeader) IsInterfaceNil() bool

IsInterfaceNil return if there is no value under the interface

func (*InterceptedMetaHeader) SetHash added in v1.0.3

func (imh *InterceptedMetaHeader) SetHash(hash []byte)

SetHash sets the hash of this header. The hash will also be the ID of this object

func (*InterceptedMetaHeader) VerifySig added in v1.0.3

func (imh *InterceptedMetaHeader) VerifySig() error

VerifySig verifies a signature

type InterceptedPeerBlockBody added in v1.0.3

type InterceptedPeerBlockBody struct {
	PeerBlockBody []*block.PeerChange
	// contains filtered or unexported fields
}

InterceptedPeerBlockBody represents the wrapper over PeerBlockBodyWrapper struct.

func NewInterceptedPeerBlockBody added in v1.0.3

func NewInterceptedPeerBlockBody() *InterceptedPeerBlockBody

NewInterceptedPeerBlockBody creates a new instance of InterceptedPeerBlockBody struct

func (*InterceptedPeerBlockBody) GetUnderlyingObject added in v1.0.3

func (inPeerBlkBdy *InterceptedPeerBlockBody) GetUnderlyingObject() interface{}

GetUnderlyingObject returns the underlying object

func (*InterceptedPeerBlockBody) Hash added in v1.0.3

func (inPeerBlkBdy *InterceptedPeerBlockBody) Hash() []byte

Hash gets the hash of this peer block body

func (*InterceptedPeerBlockBody) Integrity added in v1.0.3

func (inPeerBlkBdy *InterceptedPeerBlockBody) Integrity(coordinator sharding.Coordinator) error

Integrity checks the integrity of the state block wrapper

func (*InterceptedPeerBlockBody) IntegrityAndValidity added in v1.0.3

func (inPeerBlkBdy *InterceptedPeerBlockBody) IntegrityAndValidity(coordinator sharding.Coordinator) error

IntegrityAndValidity checks the integrity and validity of a peer block wrapper

func (*InterceptedPeerBlockBody) SetHash added in v1.0.3

func (inPeerBlkBdy *InterceptedPeerBlockBody) SetHash(hash []byte)

SetHash sets the hash of this peer block body. The hash will also be the ID of this object

type InterceptedTxBlockBody added in v1.0.3

type InterceptedTxBlockBody struct {
	TxBlockBody block.Body
	// contains filtered or unexported fields
}

InterceptedTxBlockBody represents the wrapper over TxBlockBodyWrapper struct.

func NewInterceptedTxBlockBody added in v1.0.3

func NewInterceptedTxBlockBody() *InterceptedTxBlockBody

NewInterceptedTxBlockBody creates a new instance of InterceptedTxBlockBody struct

func (*InterceptedTxBlockBody) GetUnderlyingObject added in v1.0.3

func (inTxBlkBdy *InterceptedTxBlockBody) GetUnderlyingObject() interface{}

GetUnderlyingObject returns the underlying object

func (*InterceptedTxBlockBody) Hash added in v1.0.3

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

Hash gets the hash of this transaction block body

func (*InterceptedTxBlockBody) Integrity added in v1.0.3

func (inTxBlkBdy *InterceptedTxBlockBody) Integrity(coordinator sharding.Coordinator) error

Integrity checks the integrity of the state block wrapper

func (*InterceptedTxBlockBody) IntegrityAndValidity added in v1.0.3

func (inTxBlkBdy *InterceptedTxBlockBody) IntegrityAndValidity(coordinator sharding.Coordinator) error

IntegrityAndValidity checks the integrity of a transactions block

func (*InterceptedTxBlockBody) SetHash added in v1.0.3

func (inTxBlkBdy *InterceptedTxBlockBody) SetHash(hash []byte)

SetHash sets the hash of this transaction block body. The hash will also be the ID of this object

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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