mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-01-18 13:22:42 +01:00
ForwardingService: fix possible NPE in coin selector
This commit is contained in:
parent
7aeffc4de0
commit
e34dd300ec
@ -193,7 +193,7 @@ public class ForwardingService implements Closeable {
|
||||
*/
|
||||
static CoinSelector forwardingCoinSelector(Sha256Hash parentTxId) {
|
||||
return (target, candidates) -> candidates.stream()
|
||||
.filter(output -> output.getParentTransactionHash().equals(parentTxId))
|
||||
.filter(output -> output.getParentTransactionHash() != null && output.getParentTransactionHash().equals(parentTxId))
|
||||
.collect(collectingAndThen(toList(), CoinSelection::new));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user