Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExternalSender ¶
type ExternalSender interface { // Send a message to a specific set of nodes Send( msg message.OutboundMessage, nodeIDs ids.NodeIDSet, subnetID ids.ID, validatorOnly bool, ) ids.NodeIDSet // Send a message to a random group of nodes in a subnet. // Nodes are sampled based on their validator status. Gossip( msg message.OutboundMessage, subnetID ids.ID, validatorOnly bool, numValidatorsToSend int, numNonValidatorsToSend int, numPeersToSend int, ) ids.NodeIDSet }
ExternalSender sends consensus messages to other validators Right now this is implemented in the networking package
type ExternalSenderTest ¶
type ExternalSenderTest struct { TB testing.TB CantSend, CantGossip bool SendF func(msg message.OutboundMessage, nodeIDs ids.NodeIDSet, subnetID ids.ID, validatorOnly bool) ids.NodeIDSet GossipF func(msg message.OutboundMessage, subnetID ids.ID, validatorOnly bool, numValidatorsToSend, numNonValidatorsToSend, numPeersToSend int) ids.NodeIDSet }
ExternalSenderTest is a test sender
func (*ExternalSenderTest) Default ¶
func (s *ExternalSenderTest) Default(cant bool)
Default set the default callable value to [cant]
func (*ExternalSenderTest) Gossip ¶ added in v0.8.0
func (s *ExternalSenderTest) Gossip( msg message.OutboundMessage, subnetID ids.ID, validatorOnly bool, numValidatorsToSend int, numNonValidatorsToSend int, numPeersToSend int, ) ids.NodeIDSet
Given a msg type, the corresponding mock function is called if it was initialized. If it wasn't initialized and this function shouldn't be called and testing was initialized, then testing will fail.
type GossipConfig ¶ added in v1.7.6
type GossipConfig struct { AcceptedFrontierValidatorSize uint `json:"gossipAcceptedFrontierValidatorSize" yaml:"gossipAcceptedFrontierValidatorSize"` AcceptedFrontierNonValidatorSize uint `json:"gossipAcceptedFrontierNonValidatorSize" yaml:"gossipAcceptedFrontierNonValidatorSize"` AcceptedFrontierPeerSize uint `json:"gossipAcceptedFrontierPeerSize" yaml:"gossipAcceptedFrontierPeerSize"` OnAcceptValidatorSize uint `json:"gossipOnAcceptValidatorSize" yaml:"gossipOnAcceptValidatorSize"` OnAcceptNonValidatorSize uint `json:"gossipOnAcceptNonValidatorSize" yaml:"gossipOnAcceptNonValidatorSize"` OnAcceptPeerSize uint `json:"gossipOnAcceptPeerSize" yaml:"gossipOnAcceptPeerSize"` AppGossipValidatorSize uint `json:"appGossipValidatorSize" yaml:"appGossipValidatorSize"` AppGossipNonValidatorSize uint `json:"appGossipNonValidatorSize" yaml:"appGossipNonValidatorSize"` AppGossipPeerSize uint `json:"appGossipPeerSize" yaml:"appGossipPeerSize"` }
Click to show internal directories.
Click to hide internal directories.