Package com.norswap.nanoeth.blocks
Enum 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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants Enum Constant Description VAL_BAD_DIFFICULTY
The difficulty does not match the canonical difficulty calculation.VAL_BAD_NUMBER
The number is not the parent number + 1.VAL_BAD_TX_ROOT
The Merkle root for transactions does not match the transactions included in the block.VAL_BAD_UNCLE
One of the uncle header is invalid.VAL_BAD_UNCLE_HASH
The uncle hash does not match the uncle headers.VAL_DUPLICATE_UNCLE
One or multiple uncles appear multiple time in the block.VAL_EXTRA_DATA_TOO_LONG
The extra data section is longer than 32 bytes.VAL_FUTURE_UNCLE
The uncle's number is the same or greater than the block's number.VAL_GAS_LIMIT_TOO_HIGH
The gas limit is too high compared to the parent.VAL_GAS_LIMIT_TOO_LOW
The gas limit is too low compared to the parent, or under the minimum.VAL_GAS_USED_TOO_HIGH
The gas usage is higher than the gas limit.VAL_INVALID_POW
The nonce and the mix hash are not consistent with regard to the proof of work calculation.VAL_NONCE_TOO_HIGH
The nonce does not match the difficulty.VAL_OUTDATED_TIMESTAMP
The timestamp is older than the parent's timestamp.VAL_TOO_MANY_UNCLES
Too many uncles were included.VAL_UNCLE_ALREADY_INCLUDED
An uncle has already appeared in an ancestor.VAL_UNCLE_IS_ANCESTOR
An uncle has already appeared *as* an ancestor.VAL_UNCLE_TOO_OLD
One of the uncle headers' number is too old (> 6 back).VAL_UNKNOWN_PARENT
We don't know of a block with the given parent hash.VAL_UNRELATED_UNCLE
An included uncle isn't really an uncle (the sibling of an ancestor of degree<= 6
.VAL_VALID
The block is valid. -
Method Summary
Modifier and Type Method Description boolean
valid()
static BlockValidityStatus
valueOf(String name)
Returns the enum constant of this type with the specified name.static BlockValidityStatus[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
VAL_VALID
The block is valid. -
VAL_UNKNOWN_PARENT
We don't know of a block with the given parent hash. -
VAL_OUTDATED_TIMESTAMP
The timestamp is older than the parent's timestamp. -
VAL_BAD_NUMBER
The number is not the parent number + 1. -
VAL_EXTRA_DATA_TOO_LONG
The extra data section is longer than 32 bytes. -
VAL_BAD_DIFFICULTY
The difficulty does not match the canonical difficulty calculation. -
VAL_GAS_LIMIT_TOO_HIGH
The gas limit is too high compared to the parent. -
VAL_GAS_LIMIT_TOO_LOW
The gas limit is too low compared to the parent, or under the minimum. -
VAL_GAS_USED_TOO_HIGH
The gas usage is higher than the gas limit. -
VAL_NONCE_TOO_HIGH
The nonce does not match the difficulty. -
VAL_INVALID_POW
The nonce and the mix hash are not consistent with regard to the proof of work calculation. -
VAL_TOO_MANY_UNCLES
Too many uncles were included. -
VAL_BAD_UNCLE
One of the uncle header is invalid. -
VAL_UNCLE_TOO_OLD
One of the uncle headers' number is too old (> 6 back). -
VAL_FUTURE_UNCLE
The uncle's number is the same or greater than the block's number. -
VAL_BAD_UNCLE_HASH
The uncle hash does not match the uncle headers. -
VAL_UNCLE_ALREADY_INCLUDED
An uncle has already appeared in an ancestor. -
VAL_DUPLICATE_UNCLE
One or multiple uncles appear multiple time in the block. -
VAL_UNCLE_IS_ANCESTOR
An uncle has already appeared *as* an ancestor. -
VAL_UNRELATED_UNCLE
An included uncle isn't really an uncle (the sibling of an ancestor of degree<= 6
. -
VAL_BAD_TX_ROOT
The Merkle root for transactions does not match the transactions included in the block.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
valid
public boolean valid()
-