CTransaction constructor. Also, trying to remove some excessive code.
[NovacoinLibrary.git] / Novacoin / CTxOut.cs
index 42d2b8d..aec5a88 100644 (file)
@@ -12,12 +12,12 @@ namespace Novacoin
                /// <summary>
                /// Input value.
                /// </summary>
-               private ulong nValue;
+        public ulong nValue;
 
                /// <summary>
                /// Second half of script which contains spending instructions.
                /// </summary>
-               private byte[] scriptPubKey;
+        public byte[] scriptPubKey;
 
         /// <summary>
         /// Initialize new CTxOut instance as a copy of another instance.
@@ -30,20 +30,6 @@ namespace Novacoin
         }
 
         /// <summary>
-        /// Parse input byte sequence and initialize new CTxOut instance.
-        /// </summary>
-        /// <param name="bytes">Byte sequence.</param>
-        public CTxOut(IList<byte> bytes)
-        {
-            WrappedList<byte> wBytes = new WrappedList<byte>(bytes);
-            
-            nValue = Interop.LEBytesToUInt64(wBytes.GetItems(8));
-            int spkLength = (int)VarInt.ReadVarInt(wBytes);
-
-            scriptPubKey = wBytes.GetItems(spkLength);
-        }
-
-        /// <summary>
         /// Get raw bytes representation of our output.
         /// </summary>
         /// <returns>Byte sequence.</returns>