2 using System.Collections.Generic;
5 using System.Threading.Tasks;
12 /// Hash of parent transaction.
17 /// Parent input number.
27 public COutPoint(Hash256 hashIn, uint nIn)
33 public COutPoint(COutPoint o)
35 hash = new Hash256(o.hash);
39 public COutPoint(IEnumerable<byte> bytes)
41 hash = new Hash256(bytes.Take(32));
42 n = BitConverter.ToUInt32(bytes.Skip(32).Take(4).ToArray(), 0);
47 get { return hash.IsZero && n == uint.MaxValue; }
50 public IList<byte> Bytes
54 List<byte> r = new List<byte>();
55 r.AddRange(hash.hashBytes);
56 r.AddRange(BitConverter.GetBytes(n));
62 public override string ToString()
64 StringBuilder sb = new StringBuilder();
65 sb.AppendFormat("COutPoint({0}, {1})", hash.ToString(), n);