Documentation ¶
Index ¶
- type ExternalSender
- type ExternalSenderTest
- func (s *ExternalSenderTest) Accepted(validatorID ids.ShortID, chainID ids.ID, requestID uint32, ...)
- func (s *ExternalSenderTest) AcceptedFrontier(validatorID ids.ShortID, chainID ids.ID, requestID uint32, ...)
- func (s *ExternalSenderTest) Chits(vdr ids.ShortID, chainID ids.ID, requestID uint32, votes []ids.ID)
- func (s *ExternalSenderTest) Default(cant bool)
- func (s *ExternalSenderTest) Get(vdr ids.ShortID, chainID ids.ID, requestID uint32, deadline time.Time, ...)
- func (s *ExternalSenderTest) GetAccepted(validatorIDs ids.ShortSet, chainID ids.ID, requestID uint32, ...)
- func (s *ExternalSenderTest) GetAcceptedFrontier(validatorIDs ids.ShortSet, chainID ids.ID, requestID uint32, ...)
- func (s *ExternalSenderTest) GetAncestors(vdr ids.ShortID, chainID ids.ID, requestID uint32, deadline time.Time, ...)
- func (s *ExternalSenderTest) Gossip(chainID ids.ID, containerID ids.ID, container []byte)
- func (s *ExternalSenderTest) MultiPut(vdr ids.ShortID, chainID ids.ID, requestID uint32, vtxs [][]byte)
- func (s *ExternalSenderTest) PullQuery(vdrs ids.ShortSet, chainID ids.ID, requestID uint32, deadline time.Time, ...)
- func (s *ExternalSenderTest) PushQuery(vdrs ids.ShortSet, chainID ids.ID, requestID uint32, deadline time.Time, ...)
- func (s *ExternalSenderTest) Put(vdr ids.ShortID, chainID ids.ID, requestID uint32, vtxID ids.ID, vtx []byte)
- type Sender
- func (s *Sender) Accepted(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID)
- func (s *Sender) AcceptedFrontier(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID)
- func (s *Sender) Chits(validatorID ids.ShortID, requestID uint32, votes []ids.ID)
- func (s *Sender) Context() *snow.Context
- func (s *Sender) Get(validatorID ids.ShortID, requestID uint32, containerID ids.ID)
- func (s *Sender) GetAccepted(validatorIDs ids.ShortSet, requestID uint32, containerIDs []ids.ID)
- func (s *Sender) GetAcceptedFrontier(validatorIDs ids.ShortSet, requestID uint32)
- func (s *Sender) GetAncestors(validatorID ids.ShortID, requestID uint32, containerID ids.ID)
- func (s *Sender) Gossip(containerID ids.ID, container []byte)
- func (s *Sender) Initialize(ctx *snow.Context, sender ExternalSender, router router.Router, ...)
- func (s *Sender) MultiPut(validatorID ids.ShortID, requestID uint32, containers [][]byte)
- func (s *Sender) PullQuery(validatorIDs ids.ShortSet, requestID uint32, containerID ids.ID)
- func (s *Sender) PushQuery(validatorIDs ids.ShortSet, requestID uint32, containerID ids.ID, ...)
- func (s *Sender) Put(validatorID ids.ShortID, requestID uint32, containerID ids.ID, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalSender ¶
type ExternalSender interface { GetAcceptedFrontier(validatorIDs ids.ShortSet, chainID ids.ID, requestID uint32, deadline time.Time) AcceptedFrontier(validatorID ids.ShortID, chainID ids.ID, requestID uint32, containerIDs []ids.ID) GetAccepted(validatorIDs ids.ShortSet, chainID ids.ID, requestID uint32, deadline time.Time, containerIDs []ids.ID) Accepted(validatorID ids.ShortID, chainID ids.ID, requestID uint32, containerIDs []ids.ID) GetAncestors(validatorID ids.ShortID, chainID ids.ID, requestID uint32, deadline time.Time, containerID ids.ID) MultiPut(validatorID ids.ShortID, chainID ids.ID, requestID uint32, containers [][]byte) Get(validatorID ids.ShortID, chainID ids.ID, requestID uint32, deadline time.Time, containerID ids.ID) Put(validatorID ids.ShortID, chainID ids.ID, requestID uint32, containerID ids.ID, container []byte) PushQuery(validatorIDs ids.ShortSet, chainID ids.ID, requestID uint32, deadline time.Time, containerID ids.ID, container []byte) PullQuery(validatorIDs ids.ShortSet, chainID ids.ID, requestID uint32, deadline time.Time, containerID ids.ID) Chits(validatorID ids.ShortID, chainID ids.ID, requestID uint32, votes []ids.ID) Gossip(chainID ids.ID, containerID ids.ID, container []byte) }
ExternalSender sends consensus messages to other validators Right now this is implemented in the networking package
type ExternalSenderTest ¶
type ExternalSenderTest struct { T *testing.T B *testing.B CantGetAcceptedFrontier, CantAcceptedFrontier, CantGetAccepted, CantAccepted, CantGetAncestors, CantMultiPut, CantGet, CantPut, CantPullQuery, CantPushQuery, CantChits, CantGossip bool GetAcceptedFrontierF func(validatorIDs ids.ShortSet, chainID ids.ID, requestID uint32, deadline time.Time) AcceptedFrontierF func(validatorID ids.ShortID, chainID ids.ID, requestID uint32, containerIDs []ids.ID) GetAcceptedF func(validatorIDs ids.ShortSet, chainID ids.ID, requestID uint32, deadline time.Time, containerIDs []ids.ID) AcceptedF func(validatorID ids.ShortID, chainID ids.ID, requestID uint32, containerIDs []ids.ID) GetAncestorsF func(validatorID ids.ShortID, chainID ids.ID, requestID uint32, deadline time.Time, containerID ids.ID) MultiPutF func(validatorID ids.ShortID, chainID ids.ID, requestID uint32, containers [][]byte) GetF func(validatorID ids.ShortID, chainID ids.ID, requestID uint32, deadline time.Time, containerID ids.ID) PutF func(validatorID ids.ShortID, chainID ids.ID, requestID uint32, containerID ids.ID, container []byte) PushQueryF func(validatorIDs ids.ShortSet, chainID ids.ID, requestID uint32, deadline time.Time, containerID ids.ID, container []byte) PullQueryF func(validatorIDs ids.ShortSet, chainID ids.ID, requestID uint32, deadline time.Time, containerID ids.ID) ChitsF func(validatorID ids.ShortID, chainID ids.ID, requestID uint32, votes []ids.ID) GossipF func(chainID ids.ID, containerID ids.ID, container []byte) }
ExternalSenderTest is a test sender
func (*ExternalSenderTest) Accepted ¶
func (s *ExternalSenderTest) Accepted(validatorID ids.ShortID, chainID ids.ID, requestID uint32, containerIDs []ids.ID)
Accepted calls AcceptedF if it was initialized. If it wasn't initialized and this function shouldn't be called and testing was initialized, then testing will fail.
func (*ExternalSenderTest) AcceptedFrontier ¶
func (s *ExternalSenderTest) AcceptedFrontier(validatorID ids.ShortID, chainID ids.ID, requestID uint32, containerIDs []ids.ID)
AcceptedFrontier calls AcceptedFrontierF if it was initialized. If it wasn't initialized and this function shouldn't be called and testing was initialized, then testing will fail.
func (*ExternalSenderTest) Chits ¶
func (s *ExternalSenderTest) Chits(vdr ids.ShortID, chainID ids.ID, requestID uint32, votes []ids.ID)
Chits calls ChitsF if it was initialized. If it wasn't initialized and this function shouldn't be called and testing was initialized, then testing will fail.
func (*ExternalSenderTest) Default ¶
func (s *ExternalSenderTest) Default(cant bool)
Default set the default callable value to [cant]
func (*ExternalSenderTest) Get ¶
func (s *ExternalSenderTest) Get(vdr ids.ShortID, chainID ids.ID, requestID uint32, deadline time.Time, vtxID ids.ID)
Get calls GetF if it was initialized. If it wasn't initialized and this function shouldn't be called and testing was initialized, then testing will fail.
func (*ExternalSenderTest) GetAccepted ¶
func (s *ExternalSenderTest) GetAccepted(validatorIDs ids.ShortSet, chainID ids.ID, requestID uint32, deadline time.Time, containerIDs []ids.ID)
GetAccepted calls GetAcceptedF if it was initialized. If it wasn't initialized and this function shouldn't be called and testing was initialized, then testing will fail.
func (*ExternalSenderTest) GetAcceptedFrontier ¶
func (s *ExternalSenderTest) GetAcceptedFrontier(validatorIDs ids.ShortSet, chainID ids.ID, requestID uint32, deadline time.Time)
GetAcceptedFrontier calls GetAcceptedFrontierF if it was initialized. If it wasn't initialized and this function shouldn't be called and testing was initialized, then testing will fail.
func (*ExternalSenderTest) GetAncestors ¶
func (s *ExternalSenderTest) GetAncestors(vdr ids.ShortID, chainID ids.ID, requestID uint32, deadline time.Time, vtxID ids.ID)
GetAncestors calls GetAncestorsF if it was initialized. If it wasn't initialized and this function shouldn't be called and testing was initialized, then testing will fail.
func (*ExternalSenderTest) Gossip ¶
Gossip calls GossipF if it was initialized. If it wasn't initialized and this function shouldn't be called and testing was initialized, then testing will fail.
func (*ExternalSenderTest) MultiPut ¶
func (s *ExternalSenderTest) MultiPut(vdr ids.ShortID, chainID ids.ID, requestID uint32, vtxs [][]byte)
MultiPut calls MultiPutF if it was initialized. If it wasn't initialized and this function shouldn't be called and testing was initialized, then testing will fail.
func (*ExternalSenderTest) PullQuery ¶
func (s *ExternalSenderTest) PullQuery(vdrs ids.ShortSet, chainID ids.ID, requestID uint32, deadline time.Time, vtxID ids.ID)
PullQuery calls PullQueryF if it was initialized. If it wasn't initialized and this function shouldn't be called and testing was initialized, then testing will fail.
func (*ExternalSenderTest) PushQuery ¶
func (s *ExternalSenderTest) PushQuery(vdrs ids.ShortSet, chainID ids.ID, requestID uint32, deadline time.Time, vtxID ids.ID, vtx []byte)
PushQuery calls PushQueryF 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 Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
Sender sends consensus messages to other validators
func (*Sender) AcceptedFrontier ¶
AcceptedFrontier ...
func (*Sender) Get ¶
Get sends a Get message to the consensus engine running on the specified chain to the specified validator. The Get message signifies that this consensus engine would like the recipient to send this consensus engine the specified container.
func (*Sender) GetAccepted ¶
GetAccepted ...
func (*Sender) GetAcceptedFrontier ¶
GetAcceptedFrontier ...
func (*Sender) GetAncestors ¶
GetAncestors sends a GetAncestors message
func (*Sender) Initialize ¶
func (s *Sender) Initialize(ctx *snow.Context, sender ExternalSender, router router.Router, timeouts *timeout.Manager)
Initialize this sender
func (*Sender) MultiPut ¶
MultiPut sends a MultiPut message to the consensus engine running on the specified chain on the specified validator. The MultiPut message gives the recipient the contents of several containers.
func (*Sender) PullQuery ¶
PullQuery sends a PullQuery message to the consensus engines running on the specified chains on the specified validators. The PullQuery message signifies that this consensus engine would like each validator to send their preferred frontier.
func (*Sender) PushQuery ¶
func (s *Sender) PushQuery(validatorIDs ids.ShortSet, requestID uint32, containerID ids.ID, container []byte)
PushQuery sends a PushQuery message to the consensus engines running on the specified chains on the specified validators. The PushQuery message signifies that this consensus engine would like each validator to send their preferred frontier given the existence of the specified container.
func (*Sender) Put ¶
func (s *Sender) Put(validatorID ids.ShortID, requestID uint32, containerID ids.ID, container []byte)
Put sends a Put message to the consensus engine running on the specified chain on the specified validator. The Put message signifies that this consensus engine is giving to the recipient the contents of the specified container.