eventcheck/basiccheck/basic_check.go
Consider simplifying this complex logical expression. Open
Open
if e.Seq >= math.MaxInt32/2 || e.Epoch >= math.MaxInt32/2 || e.Frame >= math.MaxInt32/2 ||
e.Lamport >= math.MaxInt32/2 || e.GasPowerUsed >= math.MaxInt64/2 || e.GasPowerLeft.Max() >= math.MaxInt64/2 {
Method Checker.Validate
has 6 return statements (exceeds 4 allowed). Open
Open
func (v *Checker) Validate(e *inter.Event) error {
if e.Version != 0 {
return ErrVersion
}
if err := v.checkLimits(e); err != nil {
Method Checker.checkInited
has 5 return statements (exceeds 4 allowed). Open
Open
func (v *Checker) checkInited(e *inter.Event) error {
if e.Seq <= 0 || e.Epoch <= 0 || e.Frame <= 0 || e.Lamport <= 0 {
return ErrNotInited // it's unsigned, but check for negative in a case if type will change
}