Skip to content

Commit

Permalink
Merge pull request #1437 from rsksmart/fix-uselles-null-check
Browse files Browse the repository at this point in the history
Fixing useless null check
  • Loading branch information
aeidelman authored Jun 14, 2021
2 parents 98d21c8 + eaeb34a commit c94ab4a
Show file tree
Hide file tree
Showing 3 changed files with 196 additions and 39 deletions.
2 changes: 1 addition & 1 deletion rskj-core/src/main/java/co/rsk/peg/Bridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ public static BridgeMethods.BridgeMethodExecutor activeAndRetiringFederationOnly
Federation retiringFederation = self.bridgeSupport.getRetiringFederation();

if (!BridgeUtils.isFromFederateMember(self.rskTx, self.bridgeSupport.getActiveFederation())
&& ( retiringFederation == null || (retiringFederation != null && !BridgeUtils.isFromFederateMember(self.rskTx, retiringFederation)))) {
&& (retiringFederation == null || !BridgeUtils.isFromFederateMember(self.rskTx, retiringFederation))) {
String errorMessage = String.format("Sender is not part of the active or retiring federations, so he is not enabled to call the function '%s'",funcName);
logger.warn(errorMessage);
throw new VMException(errorMessage);
Expand Down
Loading

0 comments on commit c94ab4a

Please sign in to comment.