Enum BlockValidityStatus

java.lang.Object
java.lang.Enum<BlockValidityStatus>
com.norswap.nanoeth.blocks.BlockValidityStatus
All Implemented Interfaces:
Serializable, Comparable<BlockValidityStatus>, Constable

public enum BlockValidityStatus
extends Enum<BlockValidityStatus>
The validity status of a block, which is either valid (VAL_VALID), or another status indicating why the block is invalid.
See Also:
BlockValidity
  • Enum Constant Details

    • VAL_VALID

      public static final BlockValidityStatus VAL_VALID
      The block is valid.
    • VAL_UNKNOWN_PARENT

      public static final BlockValidityStatus VAL_UNKNOWN_PARENT
      We don't know of a block with the given parent hash.
    • VAL_OUTDATED_TIMESTAMP

      public static final BlockValidityStatus VAL_OUTDATED_TIMESTAMP
      The timestamp is older than the parent's timestamp.
    • VAL_BAD_NUMBER

      public static final BlockValidityStatus VAL_BAD_NUMBER
      The number is not the parent number + 1.
    • VAL_EXTRA_DATA_TOO_LONG

      public static final BlockValidityStatus VAL_EXTRA_DATA_TOO_LONG
      The extra data section is longer than 32 bytes.
    • VAL_BAD_DIFFICULTY

      public static final BlockValidityStatus VAL_BAD_DIFFICULTY
      The difficulty does not match the canonical difficulty calculation.
    • VAL_GAS_LIMIT_TOO_HIGH

      public static final BlockValidityStatus VAL_GAS_LIMIT_TOO_HIGH
      The gas limit is too high compared to the parent.
    • VAL_GAS_LIMIT_TOO_LOW

      public static final BlockValidityStatus VAL_GAS_LIMIT_TOO_LOW
      The gas limit is too low compared to the parent, or under the minimum.
    • VAL_GAS_USED_TOO_HIGH

      public static final BlockValidityStatus VAL_GAS_USED_TOO_HIGH
      The gas usage is higher than the gas limit.
    • VAL_NONCE_TOO_HIGH

      public static final BlockValidityStatus VAL_NONCE_TOO_HIGH
      The nonce does not match the difficulty.
    • VAL_INVALID_POW

      public static final BlockValidityStatus VAL_INVALID_POW
      The nonce and the mix hash are not consistent with regard to the proof of work calculation.
    • VAL_TOO_MANY_UNCLES

      public static final BlockValidityStatus VAL_TOO_MANY_UNCLES
      Too many uncles were included.
    • VAL_BAD_UNCLE

      public static final BlockValidityStatus VAL_BAD_UNCLE
      One of the uncle header is invalid.
    • VAL_UNCLE_TOO_OLD

      public static final BlockValidityStatus VAL_UNCLE_TOO_OLD
      One of the uncle headers' number is too old (> 6 back).
    • VAL_FUTURE_UNCLE

      public static final BlockValidityStatus VAL_FUTURE_UNCLE
      The uncle's number is the same or greater than the block's number.
    • VAL_BAD_UNCLE_HASH

      public static final BlockValidityStatus VAL_BAD_UNCLE_HASH
      The uncle hash does not match the uncle headers.
    • VAL_UNCLE_ALREADY_INCLUDED

      public static final BlockValidityStatus VAL_UNCLE_ALREADY_INCLUDED
      An uncle has already appeared in an ancestor.
    • VAL_DUPLICATE_UNCLE

      public static final BlockValidityStatus VAL_DUPLICATE_UNCLE
      One or multiple uncles appear multiple time in the block.
    • VAL_UNCLE_IS_ANCESTOR

      public static final BlockValidityStatus VAL_UNCLE_IS_ANCESTOR
      An uncle has already appeared *as* an ancestor.
    • VAL_UNRELATED_UNCLE

      public static final BlockValidityStatus VAL_UNRELATED_UNCLE
      An included uncle isn't really an uncle (the sibling of an ancestor of degree <= 6.
    • VAL_BAD_TX_ROOT

      public static final BlockValidityStatus VAL_BAD_TX_ROOT
      The Merkle root for transactions does not match the transactions included in the block.
  • Method Details

    • values

      public static BlockValidityStatus[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static BlockValidityStatus valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • valid

      public boolean valid()