mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-23 06:35:17 +01:00
Transaction: use foreach loop in readWitnesses()
This commit is contained in:
parent
c64eb6c87e
commit
ab08261ef2
1 changed files with 3 additions and 3 deletions
|
@ -655,9 +655,9 @@ public class Transaction extends BaseMessage {
|
|||
}
|
||||
|
||||
private void readWitnesses(ByteBuffer payload) throws BufferUnderflowException, ProtocolException {
|
||||
int numWitnesses = inputs.size();
|
||||
for (int i = 0; i < numWitnesses; i++)
|
||||
getInput(i).setWitness(TransactionWitness.read(payload));
|
||||
for (TransactionInput input : inputs) {
|
||||
input.setWitness(TransactionWitness.read(payload));
|
||||
}
|
||||
}
|
||||
|
||||
/** @return true of the transaction has any witnesses in any of its inputs */
|
||||
|
|
Loading…
Add table
Reference in a new issue