broadcast

package
v1.0.115 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetShardHeaderHashesFromMetachainBlock added in v1.0.106

func GetShardHeaderHashesFromMetachainBlock(headerHandler data.HeaderHandler, shardID uint32) ([][]byte, error)

GetShardHeaderHashesFromMetachainBlock returns the header hashes for specified shard ID from the given metaHeader

func NewCommonMessenger

func NewCommonMessenger(
	marshalizer marshal.Marshalizer,
	messenger consensus.P2PMessenger,
	privateKey crypto.PrivateKey,
	shardCoordinator sharding.Coordinator,
	singleSigner crypto.SingleSigner,
) (*commonMessenger, error)

NewCommonMessenger will return a new instance of a commonMessenger

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 CommonMessengerArgs added in v1.0.106

type CommonMessengerArgs struct {
	Marshalizer      marshal.Marshalizer
	Messenger        consensus.P2PMessenger
	PrivateKey       crypto.PrivateKey
	ShardCoordinator sharding.Coordinator
	SingleSigner     crypto.SingleSigner
}

CommonMessengerArgs holds the arguments for creating commonMessenger instance

type MetaChainMessengerArgs added in v1.0.106

type MetaChainMessengerArgs struct {
	CommonMessengerArgs
}

MetaChainMessengerArgs holds the arguments for creating a metaChainMessenger instance

type ShardChainMessengerArgs added in v1.0.106

type ShardChainMessengerArgs struct {
	CommonMessengerArgs
	HeadersSubscriber consensus.HeadersPoolSubscriber
	MaxDelayCacheSize uint32
}

ShardChainMessengerArgs holds the arguments for creating a shardChainMessenger instance

Jump to

Keyboard shortcuts

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