/**
   * Checks if two objects are equal
   *
   * @param obj Object to compare
   * @return TRUE if the objects are equal
   */
  @Override
  public boolean equals(Object obj) {
    boolean areEqual = false;
    if (obj != null && (obj instanceof BlockStatus))
      areEqual = blockHash.equals(((BlockStatus) obj).blockHash);

    return areEqual;
  }
 /**
  * Process a message rejection
  *
  * <p>This method is called when a 'reject' message is received.
  *
  * @param msg Message
  * @param cmd Failing message command
  * @param reasonCode Failure reason code
  * @param description Description of the failure
  * @param hash Item hash or Sha256Hash.ZERO_HASH
  */
 @Override
 public void processReject(
     Message msg, String cmd, int reasonCode, String description, Sha256Hash hash) {
   String reason = RejectMessage.reasonCodes.get(reasonCode);
   if (reason == null) reason = "N/A";
   log.error(
       String.format(
           "Message rejected by %s\n  Command %s, Reason %s - %s\n  %s",
           msg.getPeer().getAddress().toString(), cmd, reason, description, hash.toString()));
 }
 /**
  * Returns the hash code for this object
  *
  * @return Hash code
  */
 @Override
 public int hashCode() {
   return blockHash.hashCode();
 }