Get rid of HexToList and HexToEnumerable functions
[NovacoinLibrary.git] / Novacoin / CScript.cs
index 1bd4ede..3127ec6 100644 (file)
@@ -59,7 +59,7 @@ namespace Novacoin
         /// Initializes new instance of CScript and fills it with supplied bytes
         /// </summary>
         /// <param name="bytes">Enumerator interface for byte sequence</param>
-        public CScript(IEnumerable<byte> bytes)
+        public CScript(byte[] bytes)
         {
             codeBytes = new List<byte>(bytes);
         }
@@ -135,7 +135,7 @@ namespace Novacoin
                 // OP_PUSHDATA1 0x00 0x01 [0x5a]
                 codeBytes.Add((byte)instruction.OP_PUSHDATA2);
 
-                byte[] szBytes = Interop.BEBytes((ushort)nCount);
+                var szBytes = Interop.BEBytes((ushort)nCount);
                 codeBytes.AddRange(szBytes);
             }
             else if (nCount < 0xffffffff)
@@ -143,7 +143,7 @@ namespace Novacoin
                 // OP_PUSHDATA1 0x00 0x00 0x00 0x01 [0x5a]
                 codeBytes.Add((byte)instruction.OP_PUSHDATA4);
 
-                byte[] szBytes = Interop.BEBytes((uint)nCount);
+                var szBytes = Interop.BEBytes((uint)nCount);
                 codeBytes.AddRange(szBytes);
             }