public class DefaultCoinSelector extends java.lang.Object implements CoinSelector
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.Modifier | Constructor and Description |
---|---|
protected |
DefaultCoinSelector() |
Modifier and Type | Method and Description |
---|---|
static DefaultCoinSelector |
get()
Returns a global static instance of the selector.
|
static boolean |
isSelectable(Transaction tx) |
CoinSelection |
select(Coin target,
java.util.List<TransactionOutput> candidates)
Creates a CoinSelection that tries to meet the target amount of value.
|
protected boolean |
shouldSelect(Transaction tx)
Sub-classes can override this to just customize whether transactions are usable, but keep age sorting.
|
public CoinSelection select(Coin target, java.util.List<TransactionOutput> candidates)
CoinSelector
DefaultCoinSelector
.select
in interface CoinSelector
protected boolean shouldSelect(Transaction tx)
public static boolean isSelectable(Transaction tx)
public static DefaultCoinSelector get()