Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Benchlist ¶
type Benchlist interface {
// RegisterResponse registers that we received a response from the given validator.
RegisterResponse(nodeID ids.NodeID)
// RegisterFailure registers that the given validator failed to respond.
RegisterFailure(nodeID ids.NodeID)
// IsBenched returns true if the given validator is benched.
IsBenched(nodeID ids.NodeID) bool
// GetBenched returns all benched validators.
GetBenched() []ids.NodeID
// Remove removes a validator from the benchlist.
Remove(nodeID ids.NodeID)
}
Benchlist tracks validator reliability.
func NewBenchlist ¶
NewBenchlist creates a new benchlist.
type Config ¶
type Config struct {
// Threshold is the number of consecutive failures before benching.
Threshold int
// Duration is how long a validator is benched.
Duration time.Duration
// MaxPortion is the maximum portion of validators that can be benched.
MaxPortion float64
}
Config defines benchlist configuration.
Click to show internal directories.
Click to hide internal directories.