TransactionInput: use private constructor via this() in constructor for unsigned input

This commit is contained in:
Sean Gilligan 2023-08-05 19:45:06 -07:00 committed by Andreas Schildbach
parent 1ce554c901
commit 7a558fb557

View file

@ -142,13 +142,13 @@ public class TransactionInput {
* Creates an UNSIGNED input that links to the given output
*/
TransactionInput(Transaction parentTransaction, TransactionOutput output) {
outpoint = output.getParentTransaction() != null ?
new TransactionOutPoint(output.getIndex(), output.getParentTransaction()) :
new TransactionOutPoint(output);
scriptBytes = EMPTY_ARRAY;
sequence = NO_SEQUENCE;
setParent(parentTransaction);
this.value = output.getValue();
this(parentTransaction,
EMPTY_ARRAY,
output.getParentTransaction() != null ?
new TransactionOutPoint(output.getIndex(), output.getParentTransaction()) :
new TransactionOutPoint(output),
NO_SEQUENCE,
output.getValue());
}
/**