Documentation ¶
Index ¶
- Variables
- func CreateDelayBroadcastDataForLeader(headerHash []byte, miniblocks map[uint32][]byte, ...) *delayedBroadcastData
- func CreateDelayBroadcastDataForValidator(headerHash []byte, header data.HeaderHandler, miniblocksData map[uint32][]byte, ...) *delayedBroadcastData
- func CreateValidatorHeaderBroadcastData(headerHash []byte, header data.HeaderHandler, ...) *validatorHeaderBroadcastData
- func NewCommonMessenger(marshalizer marshal.Marshalizer, messenger consensus.P2PMessenger, ...) (*commonMessenger, error)
- func NewDelayedBlockBroadcaster(args *ArgsDelayedBlockBroadcaster) (*delayedBlockBroadcaster, error)
- func NewMetaChainMessenger(args MetaChainMessengerArgs) (*metaChainMessenger, error)
- func NewShardChainMessenger(args ShardChainMessengerArgs) (*shardChainMessenger, error)
- func ValidatorDelayPerOrder() time.Duration
- type ArgsDelayedBlockBroadcaster
- type CommonMessengerArgs
- type HeaderDataForValidator
- type MetaChainMessengerArgs
- type ShardChainMessengerArgs
Constants ¶
This section is empty.
Variables ¶
var ErrNilKeysHandler = errors.New("nil keys handler")
ErrNilKeysHandler signals that a nil keys handler was provided
Functions ¶
func CreateDelayBroadcastDataForLeader ¶
func CreateDelayBroadcastDataForLeader( headerHash []byte, miniblocks map[uint32][]byte, transactions map[string][][]byte, ) *delayedBroadcastData
CreateDelayBroadcastDataForLeader -
func CreateDelayBroadcastDataForValidator ¶
func CreateDelayBroadcastDataForValidator( headerHash []byte, header data.HeaderHandler, miniblocksData map[uint32][]byte, miniBlockHashes map[string]map[string]struct{}, transactionsData map[string][][]byte, order uint32, ) *delayedBroadcastData
CreateDelayBroadcastDataForValidator creates the delayed broadcast data
func CreateValidatorHeaderBroadcastData ¶
func CreateValidatorHeaderBroadcastData( headerHash []byte, header data.HeaderHandler, metaMiniBlocksData map[uint32][]byte, metaTransactionsData map[string][][]byte, order uint32, ) *validatorHeaderBroadcastData
CreateValidatorHeaderBroadcastData creates a validatorHeaderBroadcastData object from the given parameters
func NewCommonMessenger ¶
func NewCommonMessenger( marshalizer marshal.Marshalizer, messenger consensus.P2PMessenger, shardCoordinator sharding.Coordinator, peerSigHandler crypto.PeerSignatureHandler, keysHandler consensus.KeysHandler, ) (*commonMessenger, error)
NewCommonMessenger will return a new instance of a commonMessenger
func NewDelayedBlockBroadcaster ¶
func NewDelayedBlockBroadcaster(args *ArgsDelayedBlockBroadcaster) (*delayedBlockBroadcaster, error)
NewDelayedBlockBroadcaster create a new instance of a delayed block data broadcaster
func NewMetaChainMessenger ¶
func NewMetaChainMessenger( args MetaChainMessengerArgs, ) (*metaChainMessenger, error)
NewMetaChainMessenger creates a new metaChainMessenger object
func NewShardChainMessenger ¶
func NewShardChainMessenger( args ShardChainMessengerArgs, ) (*shardChainMessenger, error)
NewShardChainMessenger creates a new shardChainMessenger object
Types ¶
type ArgsDelayedBlockBroadcaster ¶
type ArgsDelayedBlockBroadcaster struct { InterceptorsContainer process.InterceptorsContainer HeadersSubscriber consensus.HeadersPoolSubscriber ShardCoordinator sharding.Coordinator LeaderCacheSize uint32 ValidatorCacheSize uint32 AlarmScheduler timersScheduler }
ArgsDelayedBlockBroadcaster holds the arguments to create a delayed block broadcaster
type CommonMessengerArgs ¶
type CommonMessengerArgs struct { Marshalizer marshal.Marshalizer Hasher hashing.Hasher Messenger consensus.P2PMessenger ShardCoordinator sharding.Coordinator PeerSignatureHandler crypto.PeerSignatureHandler HeadersSubscriber consensus.HeadersPoolSubscriber InterceptorsContainer process.InterceptorsContainer MaxDelayCacheSize uint32 MaxValidatorDelayCacheSize uint32 AlarmScheduler core.TimersScheduler KeysHandler consensus.KeysHandler }
CommonMessengerArgs holds the arguments for creating commonMessenger instance
type HeaderDataForValidator ¶
HeaderDataForValidator -
func GetShardDataFromMetaChainBlock ¶
func GetShardDataFromMetaChainBlock( headerHandler data.HeaderHandler, shardID uint32, ) ([][]byte, []*HeaderDataForValidator, error)
GetShardDataFromMetaChainBlock -
type MetaChainMessengerArgs ¶
type MetaChainMessengerArgs struct {
CommonMessengerArgs
}
MetaChainMessengerArgs holds the arguments for creating a metaChainMessenger instance
type ShardChainMessengerArgs ¶
type ShardChainMessengerArgs struct {
CommonMessengerArgs
}
ShardChainMessengerArgs holds the arguments for creating a shardChainMessenger instance