mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-25 09:36:44 +00:00
dont add inputs with negative effective value when calculating max value
This commit is contained in:
parent
cc6e3ffdc2
commit
63394b142c
1 changed files with 1 additions and 1 deletions
|
@ -6,6 +6,6 @@ import java.util.stream.Collectors;
|
|||
public class MaxUtxoSelector implements UtxoSelector {
|
||||
@Override
|
||||
public Collection<BlockTransactionHashIndex> select(long targetValue, Collection<OutputGroup> candidates) {
|
||||
return candidates.stream().flatMap(outputGroup -> outputGroup.getUtxos().stream()).collect(Collectors.toUnmodifiableList());
|
||||
return candidates.stream().filter(outputGroup -> outputGroup.getEffectiveValue() >= 0).flatMap(outputGroup -> outputGroup.getUtxos().stream()).collect(Collectors.toUnmodifiableList());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue