mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-01-30 23:02:15 +00:00
Make the last TransactionInput c'tor public, it can be used to build coinbase transactions. Updates issue 312.
This commit is contained in:
parent
9b1edf00bd
commit
1b4fa96691
@ -54,15 +54,14 @@ public class TransactionInput extends ChildMessage implements Serializable {
|
|||||||
private Transaction parentTransaction;
|
private Transaction parentTransaction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used only in creation of the genesis block.
|
* Creates an input that connects to nothing - used only in creation of coinbase transactions.
|
||||||
*/
|
*/
|
||||||
TransactionInput(NetworkParameters params, Transaction parentTransaction, byte[] scriptBytes) {
|
public TransactionInput(NetworkParameters params, Transaction parentTransaction, byte[] scriptBytes) {
|
||||||
super(params);
|
super(params);
|
||||||
this.scriptBytes = scriptBytes;
|
this.scriptBytes = scriptBytes;
|
||||||
this.outpoint = new TransactionOutPoint(params, NO_SEQUENCE, (Transaction)null);
|
this.outpoint = new TransactionOutPoint(params, NO_SEQUENCE, (Transaction)null);
|
||||||
this.sequence = NO_SEQUENCE;
|
this.sequence = NO_SEQUENCE;
|
||||||
this.parentTransaction = parentTransaction;
|
this.parentTransaction = parentTransaction;
|
||||||
|
|
||||||
length = 40 + (scriptBytes == null ? 1 : VarInt.sizeOf(scriptBytes.length) + scriptBytes.length);
|
length = 40 + (scriptBytes == null ? 1 : VarInt.sizeOf(scriptBytes.length) + scriptBytes.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user