Package org.bitcoinj.wallet
Class FilteringCoinSelector
- java.lang.Object
-
- org.bitcoinj.wallet.FilteringCoinSelector
-
- All Implemented Interfaces:
CoinSelector
public class FilteringCoinSelector extends java.lang.Object implements CoinSelector
A filtering coin selector delegates to another coin selector, but won't select outputs spent by the given transactions.
-
-
Field Summary
Fields Modifier and Type Field Description protected CoinSelector
delegate
protected java.util.Set<TransactionOutPoint>
spent
-
Constructor Summary
Constructors Constructor Description FilteringCoinSelector(CoinSelector delegate, java.util.List<TransactionOutPoint> excludedOutPoints)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CoinSelection
select(Coin target, java.util.List<TransactionOutput> candidates)
Creates a CoinSelection that tries to meet the target amount of value.
-
-
-
Field Detail
-
delegate
protected final CoinSelector delegate
-
spent
protected final java.util.Set<TransactionOutPoint> spent
-
-
Constructor Detail
-
FilteringCoinSelector
public FilteringCoinSelector(CoinSelector delegate, java.util.List<TransactionOutPoint> excludedOutPoints)
-
-
Method Detail
-
select
public CoinSelection select(Coin target, java.util.List<TransactionOutput> candidates)
Description copied from interface:CoinSelector
Creates a CoinSelection that tries to meet the target amount of value. The candidates list is given to this call and can be edited freely. See the docs for CoinSelection to learn more, or look a the implementation ofDefaultCoinSelector
.- Specified by:
select
in interfaceCoinSelector
-
-