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.Set)
- func (s *ExternalSenderTest) Default(cant bool)
- func (s *ExternalSenderTest) Get(vdr ids.ShortID, chainID ids.ID, requestID uint32, vtxID ids.ID)
- 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) PullQuery(vdrs ids.ShortSet, chainID ids.ID, requestID uint32, vtxID ids.ID)
- func (s *ExternalSenderTest) PushQuery(vdrs ids.ShortSet, chainID ids.ID, requestID uint32, vtxID ids.ID, vtx []byte)
- 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.Set)
- func (s *Sender) AcceptedFrontier(validatorID ids.ShortID, requestID uint32, containerIDs ids.Set)
- func (s *Sender) Chits(validatorID ids.ShortID, requestID uint32, votes ids.Set)
- 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.Set)
- func (s *Sender) GetAcceptedFrontier(validatorIDs ids.ShortSet, requestID uint32)
- func (s *Sender) Initialize(ctx *snow.Context, sender ExternalSender, router router.Router, ...)
- 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) AcceptedFrontier(validatorID ids.ShortID, chainID ids.ID, requestID uint32, containerIDs ids.Set) GetAccepted(validatorIDs ids.ShortSet, chainID ids.ID, requestID uint32, containerIDs ids.Set) Accepted(validatorID ids.ShortID, chainID ids.ID, requestID uint32, containerIDs ids.Set) Get(validatorID ids.ShortID, chainID ids.ID, requestID uint32, 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, containerID ids.ID, container []byte) PullQuery(validatorIDs ids.ShortSet, chainID ids.ID, requestID uint32, containerID ids.ID) Chits(validatorID ids.ShortID, chainID ids.ID, requestID uint32, votes ids.Set) }
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, CantGet, CantPut, CantPullQuery, CantPushQuery, CantChits bool GetAcceptedFrontierF func(validatorIDs ids.ShortSet, chainID ids.ID, requestID uint32) AcceptedFrontierF func(validatorID ids.ShortID, chainID ids.ID, requestID uint32, containerIDs ids.Set) GetAcceptedF func(validatorIDs ids.ShortSet, chainID ids.ID, requestID uint32, containerIDs ids.Set) AcceptedF func(validatorID ids.ShortID, chainID ids.ID, requestID uint32, containerIDs ids.Set) GetF func(validatorID ids.ShortID, chainID ids.ID, requestID uint32, 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, containerID ids.ID, container []byte) PullQueryF func(validatorIDs ids.ShortSet, chainID ids.ID, requestID uint32, containerID ids.ID) ChitsF func(validatorID ids.ShortID, chainID ids.ID, requestID uint32, votes ids.Set) }
ExternalSenderTest is a test sender
func (*ExternalSenderTest) Accepted ¶
func (s *ExternalSenderTest) Accepted(validatorID ids.ShortID, chainID ids.ID, requestID uint32, containerIDs ids.Set)
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.Set)
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.Set)
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 ¶
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, containerIDs ids.Set)
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)
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) PullQuery ¶
func (s *ExternalSenderTest) PullQuery(vdrs ids.ShortSet, chainID ids.ID, requestID uint32, 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, 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) Initialize ¶
func (s *Sender) Initialize(ctx *snow.Context, sender ExternalSender, router router.Router, timeouts *timeout.Manager)
Initialize this sender
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.