Versions in this module Expand all Collapse all v0 v0.1.0 Dec 24, 2020 Changes in this version + const MaxContainersPerMultiPut + const MaxOutstandingRequests + const MaxTimeFetchingAncestors + const NoLock + const ReadLock + const StatusUpdateFrequency + const WriteLock + type AcceptedHandler interface + Accepted func(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + GetAccepted func(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + GetAcceptedFailed func(validatorID ids.ShortID, requestID uint32) error + type AcceptedSender interface + Accepted func(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) + GetAccepted func(validatorIDs ids.ShortSet, requestID uint32, containerIDs []ids.ID) + type Bootstrapable interface + CurrentAcceptedFrontier func() []ids.ID + FilterAccepted func(containerIDs []ids.ID) (acceptedContainerIDs []ids.ID) + ForceAccepted func(acceptedContainerIDs []ids.ID) error + type BootstrapableTest struct + CantCurrentAcceptedFrontier bool + CantFilterAccepted bool + CantForceAccepted bool + CurrentAcceptedFrontierF func() (acceptedContainerIDs []ids.ID) + FilterAcceptedF func(containerIDs []ids.ID) (acceptedContainerIDs []ids.ID) + ForceAcceptedF func(acceptedContainerIDs []ids.ID) error + T *testing.T + func (b *BootstrapableTest) CurrentAcceptedFrontier() []ids.ID + func (b *BootstrapableTest) Default(cant bool) + func (b *BootstrapableTest) FilterAccepted(containerIDs []ids.ID) []ids.ID + func (b *BootstrapableTest) ForceAccepted(containerIDs []ids.ID) error + type Bootstrapper struct + RequestID uint32 + func (b *Bootstrapper) Accepted(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + func (b *Bootstrapper) AcceptedFrontier(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + func (b *Bootstrapper) Connected(validatorID ids.ShortID) error + func (b *Bootstrapper) Disconnected(validatorID ids.ShortID) error + func (b *Bootstrapper) GetAccepted(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + func (b *Bootstrapper) GetAcceptedFailed(validatorID ids.ShortID, requestID uint32) error + func (b *Bootstrapper) GetAcceptedFrontier(validatorID ids.ShortID, requestID uint32) error + func (b *Bootstrapper) GetAcceptedFrontierFailed(validatorID ids.ShortID, requestID uint32) error + func (b *Bootstrapper) Initialize(config Config) error + func (b *Bootstrapper) Startup() error + type Config struct + Alpha uint64 + Beacons validators.Set + Bootstrapable Bootstrapable + Ctx *snow.Context + SampleK int + Sender Sender + StartupAlpha uint64 + Validators validators.Set + func DefaultConfigTest() Config + func (c *Config) Context() *snow.Context + func (c *Config) IsBootstrapped() bool + type Engine interface + Context func() *snow.Context + Health func() (interface{}, error) + IsBootstrapped func() bool + type EngineTest struct + AcceptedF func(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + AcceptedFrontierF func(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + CantAccepted bool + CantAcceptedFrontier bool + CantChits bool + CantConnected bool + CantContext bool + CantDisconnected bool + CantGet bool + CantGetAccepted bool + CantGetAcceptedFailed bool + CantGetAcceptedFrontier bool + CantGetAcceptedFrontierFailed bool + CantGetAncestors bool + CantGetAncestorsFailed bool + CantGetFailed bool + CantGossip bool + CantHealth bool + CantIsBootstrapped bool + CantMultiPut bool + CantNotify bool + CantPullQuery bool + CantPushQuery bool + CantPut bool + CantQueryFailed bool + CantShutdown bool + CantStartup bool + ChitsF func(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + ConnectedF func(validatorID ids.ShortID) error + ContextF func() *snow.Context + DisconnectedF func(validatorID ids.ShortID) error + GetAcceptedF func(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + GetAcceptedFailedF func(validatorID ids.ShortID, requestID uint32) error + GetAcceptedFrontierF func(validatorID ids.ShortID, requestID uint32) error + GetAcceptedFrontierFailedF func(validatorID ids.ShortID, requestID uint32) error + GetAncestorsF func(validatorID ids.ShortID, requestID uint32, containerID ids.ID) error + GetAncestorsFailedF func(validatorID ids.ShortID, requestID uint32) error + GetF func(validatorID ids.ShortID, requestID uint32, containerID ids.ID) error + GetFailedF func(validatorID ids.ShortID, requestID uint32) error + GossipF func() error + HealthF func() (interface{}, error) + IsBootstrappedF func() bool + MultiPutF func(validatorID ids.ShortID, requestID uint32, containers [][]byte) error + NotifyF func(Message) error + PullQueryF func(validatorID ids.ShortID, requestID uint32, containerID ids.ID) error + PushQueryF func(validatorID ids.ShortID, requestID uint32, containerID ids.ID, ...) error + PutF func(validatorID ids.ShortID, requestID uint32, containerID ids.ID, ...) error + QueryFailedF func(validatorID ids.ShortID, requestID uint32) error + ShutdownF func() error + StartupF func() error + T *testing.T + func (e *EngineTest) Accepted(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + func (e *EngineTest) AcceptedFrontier(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + func (e *EngineTest) Chits(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + func (e *EngineTest) Connected(validatorID ids.ShortID) error + func (e *EngineTest) Context() *snow.Context + func (e *EngineTest) Default(cant bool) + func (e *EngineTest) Disconnected(validatorID ids.ShortID) error + func (e *EngineTest) Get(validatorID ids.ShortID, requestID uint32, containerID ids.ID) error + func (e *EngineTest) GetAccepted(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + func (e *EngineTest) GetAcceptedFailed(validatorID ids.ShortID, requestID uint32) error + func (e *EngineTest) GetAcceptedFrontier(validatorID ids.ShortID, requestID uint32) error + func (e *EngineTest) GetAcceptedFrontierFailed(validatorID ids.ShortID, requestID uint32) error + func (e *EngineTest) GetAncestors(validatorID ids.ShortID, requestID uint32, containerID ids.ID) error + func (e *EngineTest) GetAncestorsFailed(validatorID ids.ShortID, requestID uint32) error + func (e *EngineTest) GetFailed(validatorID ids.ShortID, requestID uint32) error + func (e *EngineTest) Gossip() error + func (e *EngineTest) Health() (interface{}, error) + func (e *EngineTest) IsBootstrapped() bool + func (e *EngineTest) MultiPut(validatorID ids.ShortID, requestID uint32, containers [][]byte) error + func (e *EngineTest) Notify(msg Message) error + func (e *EngineTest) PullQuery(validatorID ids.ShortID, requestID uint32, containerID ids.ID) error + func (e *EngineTest) PushQuery(validatorID ids.ShortID, requestID uint32, containerID ids.ID, ...) error + func (e *EngineTest) Put(validatorID ids.ShortID, requestID uint32, containerID ids.ID, ...) error + func (e *EngineTest) QueryFailed(validatorID ids.ShortID, requestID uint32) error + func (e *EngineTest) Shutdown() error + func (e *EngineTest) Startup() error + type ExternalHandler interface + type FetchHandler interface + Get func(validatorID ids.ShortID, requestID uint32, containerID ids.ID) error + GetAncestors func(validatorID ids.ShortID, requestID uint32, containerID ids.ID) error + GetAncestorsFailed func(validatorID ids.ShortID, requestID uint32) error + GetFailed func(validatorID ids.ShortID, requestID uint32) error + MultiPut func(validatorID ids.ShortID, requestID uint32, containers [][]byte) error + Put func(validatorID ids.ShortID, requestID uint32, containerID ids.ID, ...) error + type FetchSender interface + Get func(validatorID ids.ShortID, requestID uint32, containerID ids.ID) + GetAncestors func(validatorID ids.ShortID, requestID uint32, containerID ids.ID) + MultiPut func(validatorID ids.ShortID, requestID uint32, containers [][]byte) + Put func(validatorID ids.ShortID, requestID uint32, containerID ids.ID, ...) + type Fetcher struct + NumFetched uint32 + OnFinished func() error + OutstandingRequests Requests + type FrontierHandler interface + AcceptedFrontier func(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + GetAcceptedFrontier func(validatorID ids.ShortID, requestID uint32) error + GetAcceptedFrontierFailed func(validatorID ids.ShortID, requestID uint32) error + type FrontierSender interface + AcceptedFrontier func(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) + GetAcceptedFrontier func(validatorIDs ids.ShortSet, requestID uint32) + type Fx struct + Fx interface{} + ID ids.ID + type Gossiper interface + Gossip func(containerID ids.ID, container []byte) + type HTTPHandler struct + Handler http.Handler + LockOptions LockOption + type Handler interface + type InternalHandler interface + Connected func(validatorID ids.ShortID) error + Disconnected func(validatorID ids.ShortID) error + Gossip func() error + Notify func(Message) error + Shutdown func() error + Startup func() error + type LockOption uint32 + type Message uint32 + const PendingTxs + func (msg Message) String() string + type QueryHandler interface + Chits func(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) error + PullQuery func(validatorID ids.ShortID, requestID uint32, containerID ids.ID) error + PushQuery func(validatorID ids.ShortID, requestID uint32, containerID ids.ID, ...) error + QueryFailed func(validatorID ids.ShortID, requestID uint32) error + type QuerySender interface + Chits func(validatorID ids.ShortID, requestID uint32, votes []ids.ID) + PullQuery func(validatorIDs ids.ShortSet, requestID uint32, containerID ids.ID) + PushQuery func(validatorIDs ids.ShortSet, requestID uint32, containerID ids.ID, ...) + type Requests struct + func (r *Requests) Add(vdr ids.ShortID, requestID uint32, containerID ids.ID) + func (r *Requests) Contains(containerID ids.ID) bool + func (r *Requests) Len() int + func (r *Requests) Remove(vdr ids.ShortID, requestID uint32) (ids.ID, bool) + func (r *Requests) RemoveAny(containerID ids.ID) bool + type Sender interface + type SenderTest struct + AcceptedF func(ids.ShortID, uint32, []ids.ID) + AcceptedFrontierF func(ids.ShortID, uint32, []ids.ID) + CantAccepted bool + CantAcceptedFrontier bool + CantChits bool + CantGet bool + CantGetAccepted bool + CantGetAcceptedFrontier bool + CantGetAncestors bool + CantGossip bool + CantMultiPut bool + CantPullQuery bool + CantPushQuery bool + CantPut bool + ChitsF func(ids.ShortID, uint32, []ids.ID) + GetAcceptedF func(ids.ShortSet, uint32, []ids.ID) + GetAcceptedFrontierF func(ids.ShortSet, uint32) + GetAncestorsF func(ids.ShortID, uint32, ids.ID) + GetF func(ids.ShortID, uint32, ids.ID) + GossipF func(ids.ID, []byte) + MultiPutF func(ids.ShortID, uint32, [][]byte) + PullQueryF func(ids.ShortSet, uint32, ids.ID) + PushQueryF func(ids.ShortSet, uint32, ids.ID, []byte) + PutF func(ids.ShortID, uint32, ids.ID, []byte) + T *testing.T + func (s *SenderTest) Accepted(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) + func (s *SenderTest) AcceptedFrontier(validatorID ids.ShortID, requestID uint32, containerIDs []ids.ID) + func (s *SenderTest) Chits(vdr ids.ShortID, requestID uint32, votes []ids.ID) + func (s *SenderTest) Default(cant bool) + func (s *SenderTest) Get(vdr ids.ShortID, requestID uint32, vtxID ids.ID) + func (s *SenderTest) GetAccepted(validatorIDs ids.ShortSet, requestID uint32, containerIDs []ids.ID) + func (s *SenderTest) GetAcceptedFrontier(validatorIDs ids.ShortSet, requestID uint32) + func (s *SenderTest) GetAncestors(validatorID ids.ShortID, requestID uint32, vtxID ids.ID) + func (s *SenderTest) Gossip(containerID ids.ID, container []byte) + func (s *SenderTest) MultiPut(vdr ids.ShortID, requestID uint32, vtxs [][]byte) + func (s *SenderTest) PullQuery(vdrs ids.ShortSet, requestID uint32, vtxID ids.ID) + func (s *SenderTest) PushQuery(vdrs ids.ShortSet, requestID uint32, vtxID ids.ID, vtx []byte) + func (s *SenderTest) Put(vdr ids.ShortID, requestID uint32, vtxID ids.ID, vtx []byte) + type StaticVM interface + CreateStaticHandlers func() map[string]*HTTPHandler + type TestVM struct + BootstrappedF func() error + BootstrappingF func() error + CantBootstrapped bool + CantBootstrapping bool + CantCreateHandlers bool + CantCreateStaticHandlers bool + CantHealth bool + CantInitialize bool + CantShutdown bool + CreateHandlersF func() map[string]*HTTPHandler + CreateStaticHandlersF func() map[string]*HTTPHandler + HealthF func() (interface{}, error) + InitializeF func(*snow.Context, database.Database, []byte, chan<- Message, []*Fx) error + ShutdownF func() error + T *testing.T + func (vm *TestVM) Bootstrapped() error + func (vm *TestVM) Bootstrapping() error + func (vm *TestVM) CreateHandlers() map[string]*HTTPHandler + func (vm *TestVM) CreateStaticHandlers() map[string]*HTTPHandler + func (vm *TestVM) Default(cant bool) + func (vm *TestVM) Health() (interface{}, error) + func (vm *TestVM) Initialize(ctx *snow.Context, db database.Database, initState []byte, ...) error + func (vm *TestVM) Shutdown() error + type VM interface + Bootstrapped func() error + Bootstrapping func() error + CreateHandlers func() map[string]*HTTPHandler + Health func() (interface{}, error) + Initialize func(ctx *snow.Context, db database.Database, genesisBytes []byte, ...) error + Shutdown func() error