Ejemplo n.º 1
0
 /// <summary>
 /// Used only in creation of the genesis block.
 /// </summary>
 internal TransactionInput(NetworkParameters networkParameters, Transaction parentTransaction, byte[] scriptBytes)
     : base(networkParameters)
 {
     ScriptBytes = scriptBytes;
     Outpoint = new TransactionOutPoint(networkParameters, -1, null);
     _sequence = uint.MaxValue;
     ParentTransaction = parentTransaction;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates an UNSIGNED input that links to the given output
 /// </summary>
 internal TransactionInput(NetworkParameters networkParameters, Transaction parentTransaction,
     TransactionOutput output)
     : base(networkParameters)
 {
     var outputIndex = output.Index;
     Outpoint = new TransactionOutPoint(networkParameters, outputIndex, output.ParentTransaction);
     ScriptBytes = EmptyArray;
     _sequence = uint.MaxValue;
     ParentTransaction = parentTransaction;
 }
Ejemplo n.º 3
0
 /// <exception cref="ProtocolException"/>
 protected override void Parse()
 {
     Outpoint = new TransactionOutPoint(NetworkParameters, Bytes, Cursor);
     Cursor += Outpoint.MessageSize;
     var scriptLen = (int) ReadVarInt();
     ScriptBytes = ReadBytes(scriptLen);
     _sequence = ReadUint32();
 }