block

package
v1.0.24 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayLastNotarized

func DisplayLastNotarized(
	marshalizer marshal.Marshalizer,
	hasher hashing.Hasher,
	lastNotarizedHdrForShard data.HeaderHandler,
	shardId uint32)

DisplayLastNotarized will display information about last notarized block

func NewHeaderCounter

func NewHeaderCounter() *headersCounter

NewHeaderCounter returns a new object that keeps track of how many headers were processed in total, and in the current block

func NewMetaProcessor

func NewMetaProcessor(
	core serviceContainer.Core,
	accounts state.AccountsAdapter,
	dataPool dataRetriever.MetaPoolsHolder,
	forkDetector process.ForkDetector,
	shardCoordinator sharding.Coordinator,
	nodesCoordinator sharding.NodesCoordinator,
	specialAddressHandler process.SpecialAddressHandler,
	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(arguments ArgShardProcessor) (*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 ArgBaseProcessor

type ArgBaseProcessor struct {
	Accounts              state.AccountsAdapter
	ForkDetector          process.ForkDetector
	Hasher                hashing.Hasher
	Marshalizer           marshal.Marshalizer
	Store                 dataRetriever.StorageService
	ShardCoordinator      sharding.Coordinator
	NodesCoordinator      sharding.NodesCoordinator
	SpecialAddressHandler process.SpecialAddressHandler
	Uint64Converter       typeConverters.Uint64ByteSliceConverter
	StartHeaders          map[uint32]data.HeaderHandler
	RequestHandler        process.RequestHandler
	Core                  serviceContainer.Core
}

ArgBaseProcessor holds all dependencies required by the process data factory in order to create new instances

type ArgShardProcessor

type ArgShardProcessor struct {
	*ArgBaseProcessor
	DataPool        dataRetriever.PoolsHolder
	TxCoordinator   process.TransactionCoordinator
	TxsPoolsCleaner process.PoolsCleaner
}

ArgShardProcessor holds all dependencies required by the process data factory in order to create new instances of shard processor

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,
	nodesCoordinator sharding.NodesCoordinator,
	marshalizer marshal.Marshalizer,
	hasher hashing.Hasher,
) *InterceptedHeader

NewInterceptedHeader creates a new instance of InterceptedHeader struct

func (*InterceptedHeader) GetHeader added in v1.0.3

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

GetHeader 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 (inHdr *InterceptedHeader) IsInterfaceNil() bool

IsInterfaceNil returns true 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 the intercepted Header block 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,
	nodesCoordinator sharding.NodesCoordinator,
	marshalizer marshal.Marshalizer,
	hasher hashing.Hasher,
) *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 returns true 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) IsInterfaceNil added in v1.0.16

func (inPeerBlkBdy *InterceptedPeerBlockBody) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

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) IsInterfaceNil added in v1.0.16

func (inTxBlkBdy *InterceptedTxBlockBody) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

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