Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Peers ¶
type Peers interface {
// Connected adds a new peer
Connected(nodeID ids.NodeID)
// Disconnected removes a peer
Disconnected(nodeID ids.NodeID)
// QueryFailed notifies the tracker that a query to a validator failed
QueryFailed(nodeID ids.NodeID)
// GetPeers returns the set of connected peers
GetPeers() set.Set[ids.NodeID]
}
Peers tracks the peers that have been sent messages
type StartupTracker ¶
type StartupTracker interface {
Tracker
// ShouldStart returns true if the startup process should start
ShouldStart() bool
}
StartupTracker tracks the startup progress
type Tracker ¶
type Tracker interface {
// IsBootstrapped returns true if the chain is done bootstrapping
IsBootstrapped() bool
// Bootstrapped marks the chain as done bootstrapping
Bootstrapped()
// RegisterRequest registers an outstanding request
RegisterRequest(nodeID ids.NodeID, requestID uint32, msgType string) (time.Time, bool)
// RegisterResponse registers a response to a request
RegisterResponse(nodeID ids.NodeID, requestID uint32, msgType string, latency time.Duration)
}
Tracker tracks the progress of operations
Click to show internal directories.
Click to hide internal directories.