Transaction script verification, unserealize exceptions
[NovacoinLibrary.git] / Novacoin / CScript.cs
index 2762f6c..e2e17e0 100644 (file)
@@ -52,7 +52,7 @@ namespace Novacoin
         /// Return a new instance of ByteQueue object for current code bytes
         /// </summary>
         /// <returns></returns>
-        public ByteQueue GetByteQUeue()
+        public ByteQueue GetByteQueue()
         {
              return new ByteQueue(codeBytes);
         }
@@ -401,7 +401,7 @@ namespace Novacoin
             // This is a pay-to-script-hash scriptPubKey;
             // get the last item that the scriptSig
             // pushes onto the stack:
-            ByteQueue wScriptSig = scriptSig.GetByteQUeue();
+            ByteQueue wScriptSig = scriptSig.GetByteQueue();
 
             instruction opcode; // Current instruction
             byte[] pushArgs; // OP_PUSHDATAn argument
@@ -493,6 +493,14 @@ namespace Novacoin
             return script.codeBytes.ToArray();
         }
 
+        /// <summary>
+        /// Script size
+        /// </summary>
+        public int Size
+        {
+            get { return codeBytes.Count; }
+        }
+
         public CScriptID ScriptID
         {
             get { return new CScriptID(Hash160.Compute160(codeBytes.ToArray())); }