This repository has been archived by the owner on Jan 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
82a91a4
commit a6d488b
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/main/java/de/maltemoeser/bcgraph/restrictions/graph/NoOpReturnOutputRestriction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package de.maltemoeser.bcgraph.restrictions.graph; | ||
|
||
import de.maltemoeser.bcgraph.entities.BCOutput; | ||
import de.maltemoeser.bcgraph.entities.BCTransaction; | ||
import de.maltemoeser.bcgraph.restrictions.Restriction; | ||
|
||
|
||
public class NoOpReturnOutputRestriction implements Restriction<BCTransaction> { | ||
|
||
@Override | ||
public boolean evaluate(BCTransaction entity) { | ||
for(BCOutput output : entity.getOutputs()) { | ||
if(output.isOpReturn()) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters