mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-10 09:20:04 +01:00
Transaction: use stream in hasWitnesses()
This commit is contained in:
parent
ab08261ef2
commit
3f3f9bb636
1 changed files with 1 additions and 4 deletions
|
@ -662,10 +662,7 @@ public class Transaction extends BaseMessage {
|
|||
|
||||
/** @return true of the transaction has any witnesses in any of its inputs */
|
||||
public boolean hasWitnesses() {
|
||||
for (TransactionInput in : inputs)
|
||||
if (in.hasWitness())
|
||||
return true;
|
||||
return false;
|
||||
return inputs.stream().anyMatch(TransactionInput::hasWitness);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue