Skip to content

Commit

Permalink
Simplified some conditions in require() clauses (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
k1rill-fedoseev authored and akolotov committed Jan 4, 2020
1 parent 49c0b80 commit e0a1d65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions contracts/libraries/Message.sol
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ library Message {
IBridgeValidators _validatorContract,
bool isAMBMessage
) internal view {
require(isAMBMessage || (!isAMBMessage && isMessageValid(_message)));
require(isAMBMessage || isMessageValid(_message));
uint256 requiredSignatures = _validatorContract.requiredSignatures();
// It is not necessary to check that arrays have the same length since it will be handled
// during attempt to access to the corresponding elements in the loop and the call will be reverted.
Expand All @@ -127,7 +127,7 @@ library Message {
IBridgeValidators _validatorContract,
bool isAMBMessage
) internal view {
require(isAMBMessage || (!isAMBMessage && isMessageValid(_message)));
require(isAMBMessage || isMessageValid(_message));
uint256 requiredSignatures = _validatorContract.requiredSignatures();
uint256 amount;
assembly {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ contract BasicAMB is BasicBridge {
address _owner
) external onlyRelevantSender returns (bool) {
require(!isInitialized());
require(_validatorContract != address(0) && AddressUtils.isContract(_validatorContract));
require(AddressUtils.isContract(_validatorContract));
require(_gasPrice > 0);
require(_requiredBlockConfirmations > 0);

Expand Down

0 comments on commit e0a1d65

Please sign in to comment.