Init some fields, add ToString() for Hash160 and Hash256, start implementation of...
[NovacoinLibrary.git] / Novacoin / CTxIn.cs
1 \feffusing System;
2 using System.Text;
3
4 namespace Novacoin
5 {
6         /// <summary>
7         /// Transaction input.
8         /// </summary>
9         public class CTxIn
10         {
11                 /// <summary>
12                 /// Hash of parent transaction.
13                 /// </summary>
14                 public Hash256 txID = new Hash256();
15
16                 /// <summary>
17                 /// Parent input number.
18                 /// </summary>
19                 public uint nInput = 0;
20
21                 /// <summary>
22                 /// First half of script, signatures for the scriptPubKey
23                 /// </summary>
24                 public byte[] scriptSig;
25
26                 /// <summary>
27                 /// Transaction variant number, irrelevant if nLockTime isn't specified. Its value is 0xffffffff by default.
28                 /// </summary>
29                 public uint nSequence = 0xffffffff;
30
31                 public CTxIn ()
32                 {
33                 }
34
35                 public override string ToString ()
36                 {
37                         StringBuilder sb = new StringBuilder ();
38                         sb.AppendFormat ("CTxIn(txId={0},n={1},scriptSig={2}", nInput, nInput, scriptSig.ToString());
39
40                         return sb.ToString ();
41                 }
42
43         }
44 }
45