ToInt64 -> ToUInt64
[NovacoinLibrary.git] / NovacoinTest / Program.cs
index f9b5128..933481a 100644 (file)
@@ -270,6 +270,26 @@ namespace NovacoinTest
             keyStore.ResetPool();
             Console.WriteLine("Done in {0} ms.", watch.ElapsedMilliseconds);
 
+            Console.WriteLine("Hash comparison tests:");
+
+            ScryptHash256 hash1 = b1.header.Hash;
+            ScryptHash256 hash2 = b2.header.Hash;
+            ScryptHash256 hash3 = veryBigBlock.header.Hash;
+
+            Console.WriteLine("{0} < {1} : {2}", hash1.ToString(), hash3.ToString(), hash1 < hash3);
+            Console.WriteLine("{0} > {1} : {2}", hash1.ToString(), hash3.ToString(), hash1 > hash3);
+            Console.WriteLine("{0} <= {1} : {2}", hash1.ToString(), hash2.ToString(), hash1 <= hash2);
+            Console.WriteLine("{0} >= {1} : {2}", hash1.ToString(), hash2.ToString(), hash1 >= hash2);
+
+            Console.WriteLine("{0} != {1} : {2}", hash1.ToString(), hash2.ToString(), hash1 != hash2);
+            Console.WriteLine("{0} == {1} : {2}", hash2.ToString(), hash3.ToString(), hash2 == hash3);
+
+            /* 
+            Console.WriteLine("Reading the block file...");
+            var bs = new CBlockStore();
+            bs.ParseBlockFile();
+            */
+
             Console.ReadLine();
         }
     }