mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-08 20:11:21 +00:00
33 lines
711 B
Go
33 lines
711 B
Go
|
package valset
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
// TotalVotingPowerExceededError is returned when the maximum allowed total voting power is exceeded
|
||
|
type TotalVotingPowerExceededError struct {
|
||
|
Sum int64
|
||
|
Validators []*Validator
|
||
|
}
|
||
|
|
||
|
func (e *TotalVotingPowerExceededError) Error() string {
|
||
|
return fmt.Sprintf(
|
||
|
"Total voting power should be guarded to not exceed %v; got: %v; for validator set: %v",
|
||
|
MaxTotalVotingPower,
|
||
|
e.Sum,
|
||
|
e.Validators,
|
||
|
)
|
||
|
}
|
||
|
|
||
|
type InvalidStartEndBlockError struct {
|
||
|
Start uint64
|
||
|
End uint64
|
||
|
CurrentHeader uint64
|
||
|
}
|
||
|
|
||
|
func (e *InvalidStartEndBlockError) Error() string {
|
||
|
return fmt.Sprintf(
|
||
|
"Invalid parameters start: %d and end block: %d params",
|
||
|
e.Start,
|
||
|
e.End,
|
||
|
)
|
||
|
}
|