X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=NovacoinTest%2FProgram.cs;fp=NovacoinTest%2FProgram.cs;h=6f2f8e1996d3e02123a8a904b3cc9b3d6ecbc58b;hb=5671ee17bc35fb578e18168833c5d1e3e86a7e28;hp=7a2c23f5e1551873b0e477b30b891a7508897261;hpb=df0815d3cb055a1a6108ee7b6788a02e822a8fc1;p=NovacoinLibrary.git diff --git a/NovacoinTest/Program.cs b/NovacoinTest/Program.cs index 7a2c23f..6f2f8e1 100644 --- a/NovacoinTest/Program.cs +++ b/NovacoinTest/Program.cs @@ -270,6 +270,20 @@ 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(), 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}", hash1.ToString(), hash2.ToString(), hash1 >= hash2); + + Console.WriteLine("{0} != {1} : {2}", hash1.ToString(), hash2.ToString(), hash1 != hash2); + Console.WriteLine("{0} == {1} : {2}", hash3.ToString(), hash3.ToString(), hash3 == hash3); + /* Console.WriteLine("Reading the block file..."); var bs = new CBlockStore();