mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-10 09:20:04 +01:00
ForwardingService: check existing forwardingCoinSelector()
precondition
Check `parentTxId != null`.
This commit is contained in:
parent
0bd5ed9b9b
commit
21200c15cc
1 changed files with 1 additions and 0 deletions
|
@ -193,6 +193,7 @@ public class ForwardingService implements Closeable {
|
|||
* @return a coin selector
|
||||
*/
|
||||
static CoinSelector forwardingCoinSelector(Sha256Hash parentTxId) {
|
||||
Objects.requireNonNull(parentTxId);
|
||||
return (target, candidates) -> candidates.stream()
|
||||
.filter(output -> Objects.equals(output.getParentTransactionHash(), parentTxId))
|
||||
.collect(collectingAndThen(toList(), CoinSelection::new));
|
||||
|
|
Loading…
Add table
Reference in a new issue