com.google.bitcoin.wallet
Class DefaultCoinSelector

java.lang.Object
  extended by com.google.bitcoin.wallet.DefaultCoinSelector
All Implemented Interfaces:
CoinSelector
Direct Known Subclasses:
AllowUnconfirmedCoinSelector

public class DefaultCoinSelector
extends Object
implements CoinSelector

This class implements a CoinSelector which attempts to get the highest priority possible. This means that the transaction is the most likely to get confirmed. Note that this means we may end up "spending" more priority than would be required to get the transaction we are creating confirmed.


Constructor Summary
DefaultCoinSelector()
           
 
Method Summary
static boolean isSelectable(Transaction tx)
           
 CoinSelection select(BigInteger biTarget, LinkedList<TransactionOutput> candidates)
           
protected  boolean shouldSelect(Transaction tx)
          Sub-classes can override this to just customize whether transactions are usable, but keep age sorting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCoinSelector

public DefaultCoinSelector()
Method Detail

select

public CoinSelection select(BigInteger biTarget,
                            LinkedList<TransactionOutput> candidates)
Specified by:
select in interface CoinSelector

shouldSelect

protected boolean shouldSelect(Transaction tx)
Sub-classes can override this to just customize whether transactions are usable, but keep age sorting.


isSelectable

public static boolean isSelectable(Transaction tx)


Copyright © 2014. All rights reserved.