com.google.bitcoin.core
Enum TransactionConfidence.ConfidenceType

java.lang.Object
  extended by java.lang.Enum<TransactionConfidence.ConfidenceType>
      extended by com.google.bitcoin.core.TransactionConfidence.ConfidenceType
All Implemented Interfaces:
Serializable, Comparable<TransactionConfidence.ConfidenceType>
Enclosing class:
TransactionConfidence

public static enum TransactionConfidence.ConfidenceType
extends Enum<TransactionConfidence.ConfidenceType>

Describes the state of the transaction in general terms. Properties can be read to learn specifics.


Enum Constant Summary
BUILDING
          If BUILDING, then the transaction is included in the best chain and your confidence in it is increasing.
DEAD
          If DEAD, then it means the transaction won't confirm unless there is another re-org, because some other transaction is spending one of its inputs.
PENDING
          If PENDING, then the transaction is unconfirmed and should be included shortly, as long as it is being announced and is considered valid by the network.
UNKNOWN
          If a transaction hasn't been broadcast yet, or there's no record of it, its confidence is UNKNOWN.
 
Method Summary
 int getValue()
           
static TransactionConfidence.ConfidenceType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static TransactionConfidence.ConfidenceType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BUILDING

public static final TransactionConfidence.ConfidenceType BUILDING
If BUILDING, then the transaction is included in the best chain and your confidence in it is increasing.


PENDING

public static final TransactionConfidence.ConfidenceType PENDING
If PENDING, then the transaction is unconfirmed and should be included shortly, as long as it is being announced and is considered valid by the network. A pending transaction will be announced if the containing wallet has been attached to a live PeerGroup using PeerGroup.addWallet(Wallet). You can estimate how likely the transaction is to be included by connecting to a bunch of nodes then measuring how many announce it, using TransactionConfidence.numBroadcastPeers(). Or if you saw it from a trusted peer, you can assume it's valid and will get mined sooner or later as well.


DEAD

public static final TransactionConfidence.ConfidenceType DEAD
If DEAD, then it means the transaction won't confirm unless there is another re-org, because some other transaction is spending one of its inputs. Such transactions should be alerted to the user so they can take action, eg, suspending shipment of goods if they are a merchant. It can also mean that a coinbase transaction has been made dead from it being moved onto a side chain.


UNKNOWN

public static final TransactionConfidence.ConfidenceType UNKNOWN
If a transaction hasn't been broadcast yet, or there's no record of it, its confidence is UNKNOWN.

Method Detail

values

public static TransactionConfidence.ConfidenceType[] 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.ConfidenceType c : TransactionConfidence.ConfidenceType.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.ConfidenceType 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

getValue

public int getValue()


Copyright © 2014. All rights reserved.