Package org.bitcoinj.core
Enum TransactionConfidence.Listener.ChangeReason
- java.lang.Object
-
- java.lang.Enum<TransactionConfidence.Listener.ChangeReason>
-
- org.bitcoinj.core.TransactionConfidence.Listener.ChangeReason
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TransactionConfidence.Listener.ChangeReason>
- Enclosing interface:
- TransactionConfidence.Listener
public static enum TransactionConfidence.Listener.ChangeReason extends java.lang.Enum<TransactionConfidence.Listener.ChangeReason>
An enum that describes why a transaction confidence listener is being invoked (i.e. the class of change).
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEPTH
Occurs when a transaction that is in the best known block chain gets buried by another block.SEEN_PEERS
Occurs when a pending transaction (not in the chain) was announced by another connected peers.TYPE
Occurs when the type returned byTransactionConfidence.getConfidenceType()
has changed.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TransactionConfidence.Listener.ChangeReason
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TransactionConfidence.Listener.ChangeReason[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TYPE
public static final TransactionConfidence.Listener.ChangeReason TYPE
Occurs when the type returned byTransactionConfidence.getConfidenceType()
has changed. For example, if a PENDING transaction changes to BUILDING or DEAD, then this reason will be given. It's a high level summary.
-
DEPTH
public static final TransactionConfidence.Listener.ChangeReason DEPTH
Occurs when a transaction that is in the best known block chain gets buried by another block. If you're waiting for a certain number of confirmations, this is the reason to watch out for.
-
SEEN_PEERS
public static final TransactionConfidence.Listener.ChangeReason SEEN_PEERS
Occurs when a pending transaction (not in the chain) was announced by another connected peers. By watching the number of peers that announced a transaction go up, you can see whether it's being accepted by the network or not. If all your peers announce, it's a pretty good bet the transaction is considered relayable and has thus reached the miners.
-
-
Method Detail
-
values
public static TransactionConfidence.Listener.ChangeReason[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TransactionConfidence.Listener.ChangeReason c : TransactionConfidence.Listener.ChangeReason.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TransactionConfidence.Listener.ChangeReason valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-