Open code423n4 opened 2 years ago
Using multiple require statements is cheaper than using && multiple check combinations. There are more advantages, such as easier to read code and better coverage reports.
Tools Used Visual inspection
require( _currentValset.validators.length == _currentValset.powers.length && _currentValset.validators.length == _v.length && _currentValset.validators.length == _r.length && _currentValset.validators.length == _s.length, "Malformed current validator set" );
-> require(_currentValset.validators.length == _currentValset.powers.length); require(_currentValset.validators.length == _v.length); require(_currentValset.validators.length == _r.length); "Malformed current validator set" );
Using multiple require statements is cheaper than using && multiple check combinations. There are more advantages, such as easier to read code and better coverage reports.
Tools Used Visual inspection
require( _currentValset.validators.length == _currentValset.powers.length && _currentValset.validators.length == _v.length && _currentValset.validators.length == _r.length && _currentValset.validators.length == _s.length, "Malformed current validator set" );
-> require(_currentValset.validators.length == _currentValset.powers.length); require(_currentValset.validators.length == _v.length); require(_currentValset.validators.length == _r.length); "Malformed current validator set" );