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.HashSet<TransactionOutPoint>
spent
-
Constructor Summary
Constructors Constructor Description FilteringCoinSelector(CoinSelector delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
excludeOutputsSpentBy(Transaction tx)
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 CoinSelector delegate
-
spent
protected java.util.HashSet<TransactionOutPoint> spent
-
-
Constructor Detail
-
FilteringCoinSelector
public FilteringCoinSelector(CoinSelector delegate)
-
-
Method Detail
-
excludeOutputsSpentBy
public void excludeOutputsSpentBy(Transaction tx)
-
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
-
-