Documentation ¶
Index ¶
- func NewMetaProcessor(accounts state.AccountsAdapter, dataPool dataRetriever.MetaPoolsHolder, ...) (*metaProcessor, error)
- func NewShardProcessor(dataPool dataRetriever.PoolsHolder, store dataRetriever.StorageService, ...) (*shardProcessor, error)
- type InterceptedHeader
- func (inHdr *InterceptedHeader) GetHeader() *block.Header
- func (inHdr *InterceptedHeader) GetUnderlyingObject() interface{}
- func (inHdr *InterceptedHeader) Hash() []byte
- func (inHdr *InterceptedHeader) Integrity(coordinator sharding.Coordinator) error
- func (inHdr *InterceptedHeader) IntegrityAndValidity(coordinator sharding.Coordinator) error
- func (inHdr *InterceptedHeader) SetHash(hash []byte)
- func (inHdr *InterceptedHeader) Shard() uint32
- func (inHdr *InterceptedHeader) VerifySig() error
- type InterceptedMetaHeader
- func (imh *InterceptedMetaHeader) GetMetaHeader() *block.MetaBlock
- func (imh *InterceptedMetaHeader) Hash() []byte
- func (imh *InterceptedMetaHeader) Integrity(coordinator sharding.Coordinator) error
- func (imh *InterceptedMetaHeader) IntegrityAndValidity(coordinator sharding.Coordinator) error
- func (imh *InterceptedMetaHeader) SetHash(hash []byte)
- func (imh *InterceptedMetaHeader) VerifySig() error
- type InterceptedPeerBlockBody
- func (inPeerBlkBdy *InterceptedPeerBlockBody) GetUnderlyingObject() interface{}
- func (inPeerBlkBdy *InterceptedPeerBlockBody) Hash() []byte
- func (inPeerBlkBdy *InterceptedPeerBlockBody) Integrity(coordinator sharding.Coordinator) error
- func (inPeerBlkBdy *InterceptedPeerBlockBody) IntegrityAndValidity(coordinator sharding.Coordinator) error
- func (inPeerBlkBdy *InterceptedPeerBlockBody) SetHash(hash []byte)
- type InterceptedTxBlockBody
- func (inTxBlkBdy *InterceptedTxBlockBody) GetUnderlyingObject() interface{}
- func (inTxBlkBdy *InterceptedTxBlockBody) Hash() []byte
- func (inTxBlkBdy *InterceptedTxBlockBody) Integrity(coordinator sharding.Coordinator) error
- func (inTxBlkBdy *InterceptedTxBlockBody) IntegrityAndValidity(coordinator sharding.Coordinator) error
- func (inTxBlkBdy *InterceptedTxBlockBody) SetHash(hash []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMetaProcessor ¶
func NewMetaProcessor( accounts state.AccountsAdapter, dataPool dataRetriever.MetaPoolsHolder, forkDetector process.ForkDetector, shardCoordinator sharding.Coordinator, hasher hashing.Hasher, marshalizer marshal.Marshalizer, store dataRetriever.StorageService, requestHeaderHandler func(shardId uint32, hdrHash []byte), ) (*metaProcessor, error)
NewMetaProcessor creates a new metaProcessor object
func NewShardProcessor ¶
func NewShardProcessor( dataPool dataRetriever.PoolsHolder, store dataRetriever.StorageService, hasher hashing.Hasher, marshalizer marshal.Marshalizer, txProcessor process.TransactionProcessor, accounts state.AccountsAdapter, shardCoordinator sharding.Coordinator, forkDetector process.ForkDetector, blocksTracker process.BlocksTracker, requestTransactionHandler func(shardId uint32, txHashes [][]byte), requestMiniBlockHandler func(shardId uint32, miniblockHash []byte), ) (*shardProcessor, error)
NewShardProcessor creates a new shardProcessor object
Types ¶
type InterceptedHeader ¶
InterceptedHeader represents the wrapper over HeaderWrapper struct. It implements Newer and Hashed interfaces
func NewInterceptedHeader ¶
func NewInterceptedHeader( multiSigVerifier crypto.MultiSigVerifier, chronologyValidator process.ChronologyValidator, ) *InterceptedHeader
NewInterceptedHeader creates a new instance of InterceptedHeader struct
func (*InterceptedHeader) GetHeader ¶
func (inHdr *InterceptedHeader) GetHeader() *block.Header
GetShardHeader returns the Header pointer that holds the data
func (*InterceptedHeader) GetUnderlyingObject ¶
func (inHdr *InterceptedHeader) GetUnderlyingObject() interface{}
GetUnderlyingObject returns the underlying object
func (*InterceptedHeader) Hash ¶
func (inHdr *InterceptedHeader) Hash() []byte
Hash gets the hash of this header
func (*InterceptedHeader) Integrity ¶
func (inHdr *InterceptedHeader) Integrity(coordinator sharding.Coordinator) error
Integrity checks the integrity of the state block wrapper
func (*InterceptedHeader) IntegrityAndValidity ¶
func (inHdr *InterceptedHeader) IntegrityAndValidity(coordinator sharding.Coordinator) error
IntegrityAndValidity checks the integrity and validity of a block header wrapper
func (*InterceptedHeader) SetHash ¶
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 ¶
func (inHdr *InterceptedHeader) Shard() uint32
Shard returns the shard ID for which this header is addressed
func (*InterceptedHeader) VerifySig ¶
func (inHdr *InterceptedHeader) VerifySig() error
VerifySig verifies a signature
type InterceptedMetaHeader ¶
InterceptedHeader represents the wrapper over HeaderWrapper struct. It implements Newer and Hashed interfaces
func NewInterceptedMetaHeader ¶
func NewInterceptedMetaHeader( multiSigVerifier crypto.MultiSigVerifier, chronologyValidator process.ChronologyValidator, ) *InterceptedMetaHeader
NewInterceptedHeader creates a new instance of InterceptedHeader struct
func (*InterceptedMetaHeader) GetMetaHeader ¶
func (imh *InterceptedMetaHeader) GetMetaHeader() *block.MetaBlock
GetMetaHeader returns the MetaBlock pointer that holds the data
func (*InterceptedMetaHeader) Hash ¶
func (imh *InterceptedMetaHeader) Hash() []byte
Hash gets the hash of this header
func (*InterceptedMetaHeader) Integrity ¶
func (imh *InterceptedMetaHeader) Integrity(coordinator sharding.Coordinator) error
Integrity checks the integrity of the state block wrapper
func (*InterceptedMetaHeader) IntegrityAndValidity ¶
func (imh *InterceptedMetaHeader) IntegrityAndValidity(coordinator sharding.Coordinator) error
IntegrityAndValidity checks the integrity and validity of a block header wrapper
func (*InterceptedMetaHeader) SetHash ¶
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 ¶
func (imh *InterceptedMetaHeader) VerifySig() error
VerifySig verifies a signature
type InterceptedPeerBlockBody ¶
type InterceptedPeerBlockBody struct { PeerBlockBody []*block.PeerChange // contains filtered or unexported fields }
InterceptedPeerBlockBody represents the wrapper over PeerBlockBodyWrapper struct.
func NewInterceptedPeerBlockBody ¶
func NewInterceptedPeerBlockBody() *InterceptedPeerBlockBody
NewInterceptedPeerBlockBody creates a new instance of InterceptedPeerBlockBody struct
func (*InterceptedPeerBlockBody) GetUnderlyingObject ¶
func (inPeerBlkBdy *InterceptedPeerBlockBody) GetUnderlyingObject() interface{}
GetUnderlyingObject returns the underlying object
func (*InterceptedPeerBlockBody) Hash ¶
func (inPeerBlkBdy *InterceptedPeerBlockBody) Hash() []byte
Hash gets the hash of this peer block body
func (*InterceptedPeerBlockBody) Integrity ¶
func (inPeerBlkBdy *InterceptedPeerBlockBody) Integrity(coordinator sharding.Coordinator) error
Integrity checks the integrity of the state block wrapper
func (*InterceptedPeerBlockBody) IntegrityAndValidity ¶
func (inPeerBlkBdy *InterceptedPeerBlockBody) IntegrityAndValidity(coordinator sharding.Coordinator) error
IntegrityAndValidity checks the integrity and validity of a peer block wrapper
func (*InterceptedPeerBlockBody) SetHash ¶
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 ¶
type InterceptedTxBlockBody struct { TxBlockBody block.Body // contains filtered or unexported fields }
InterceptedTxBlockBody represents the wrapper over TxBlockBodyWrapper struct.
func NewInterceptedTxBlockBody ¶
func NewInterceptedTxBlockBody() *InterceptedTxBlockBody
NewInterceptedTxBlockBody creates a new instance of InterceptedTxBlockBody struct
func (*InterceptedTxBlockBody) GetUnderlyingObject ¶
func (inTxBlkBdy *InterceptedTxBlockBody) GetUnderlyingObject() interface{}
GetUnderlyingObject returns the underlying object
func (*InterceptedTxBlockBody) Hash ¶
func (inTxBlkBdy *InterceptedTxBlockBody) Hash() []byte
Hash gets the hash of this transaction block body
func (*InterceptedTxBlockBody) Integrity ¶
func (inTxBlkBdy *InterceptedTxBlockBody) Integrity(coordinator sharding.Coordinator) error
Integrity checks the integrity of the state block wrapper
func (*InterceptedTxBlockBody) IntegrityAndValidity ¶
func (inTxBlkBdy *InterceptedTxBlockBody) IntegrityAndValidity(coordinator sharding.Coordinator) error
IntegrityAndValidity checks the integrity of a transactions block
func (*InterceptedTxBlockBody) SetHash ¶
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