Ejemplo n.º 1
0
 /** Checks if the given input passes some of the AreInputsStandard checks. Not complete. */
 public static RuleViolation isInputStandard(TransactionInput input) {
   for (ScriptChunk chunk : input.getScriptSig().getChunks()) {
     if (chunk.data != null && !chunk.isShortestPossiblePushData())
       return RuleViolation.SHORTEST_POSSIBLE_PUSHDATA;
   }
   return RuleViolation.NONE;
 }
Ejemplo n.º 2
0
 /** Checks the output to see if the script violates a standardness rule. Not complete. */
 public static RuleViolation isOutputStandard(TransactionOutput output) {
   if (output.getValue().compareTo(MIN_ANALYSIS_NONDUST_OUTPUT) < 0) return RuleViolation.DUST;
   for (ScriptChunk chunk : output.getScriptPubKey().getChunks()) {
     if (chunk.isPushData() && !chunk.isShortestPossiblePushData())
       return RuleViolation.SHORTEST_POSSIBLE_PUSHDATA;
   }
   return RuleViolation.NONE;
 }