Remove Hash, Hash256, Hash160 and ScryptHash256 classes.
[NovacoinLibrary.git] / Novacoin / CTransaction.cs
index fd62f41..fb865a4 100644 (file)
@@ -56,6 +56,11 @@ namespace Novacoin
         public const ulong nMaxMoney = 2000000000 * nCoin;
 
         /// <summary>
+        /// Maximum transaction size is 250Kb
+        /// </summary>
+        public const uint nMaxTxSize = 250000;
+
+        /// <summary>
         /// Version of transaction schema.
         /// </summary>
         public uint nVersion;
@@ -174,7 +179,7 @@ namespace Novacoin
         /// <returns>Checking result</returns>
         public bool CheckTransaction()
         {
-            if (Size > 250000 || vin.Length == 0 || vout.Length == 0)
+            if (Size > nMaxTxSize || vin.Length == 0 || vout.Length == 0)
             {
                 return false;
             }
@@ -393,9 +398,9 @@ namespace Novacoin
         /// <summary>
         /// Transaction hash
         /// </summary>
-        public Hash256 Hash
+        public uint256 Hash
         {
-            get { return Hash256.Compute256(this); }
+            get { return CryptoUtils.ComputeHash256(this); }
         }
 
         /// <summary>