Hash and CTransaction: remove pre-initialization of properties.
authorCryptoManiac <balthazar@yandex.ru>
Sat, 29 Aug 2015 16:49:42 +0000 (19:49 +0300)
committerCryptoManiac <balthazar@yandex.ru>
Sat, 29 Aug 2015 16:49:42 +0000 (19:49 +0300)
Novacoin/CTransaction.cs
Novacoin/Hash.cs

index 733ef53..fd8c28f 100644 (file)
@@ -30,12 +30,12 @@ namespace Novacoin
         /// <summary>
         /// Version of transaction schema.
         /// </summary>
-        public uint nVersion = 1;
+        public uint nVersion;
 
         /// <summary>
         /// Transaction timestamp.
         /// </summary>
-        public uint nTime = 0;
+        public uint nTime;
 
         /// <summary>
         /// Array of transaction inputs
@@ -50,7 +50,7 @@ namespace Novacoin
         /// <summary>
         /// Block height or timestamp when transaction is final
         /// </summary>
-        public uint nLockTime = 0;
+        public uint nLockTime;
 
         /// <summary>
         /// Initialize an empty instance
@@ -60,8 +60,11 @@ namespace Novacoin
             // Initialize empty input and output arrays. Please note that such 
             // configuration is not valid for real transaction, you have to supply 
             // at least one input and one output.
+            nVersion = 1;
+            nTime = 0;
             vin = new CTxIn[0];
             vout = new CTxOut[0];
+            nLockTime = 0;
         }
 
         /// <summary>
index 941854f..5b1d3b7 100644 (file)
@@ -27,7 +27,7 @@ namespace Novacoin
         /// <summary>
         /// Array of digest bytes.
         /// </summary>
-        protected byte[] _hashBytes = null;
+        protected byte[] _hashBytes;
 
         /// <summary>
         /// Hash size, must be overriden