Add key store reset test
[NovacoinLibrary.git] / NovacoinTest / Program.cs
index 708747d..5b1c51e 100644 (file)
@@ -248,10 +248,11 @@ namespace NovacoinTest
 
             // Initialization of key store
 
-            Console.Write("Initialization of key store...");
+            Console.WriteLine("Initialization of key store...");
+            watch = Stopwatch.StartNew();
             var keyStore = new CKeyStore();
 
-            Console.WriteLine("Adding and querying new key pair");
+            Console.WriteLine("Initialization done in {0} ms, adding and querying new key pair.", watch.ElapsedMilliseconds);
             var kp1 = new CKeyPair();
             keyStore.AddKey(kp1);
 
@@ -265,6 +266,11 @@ namespace NovacoinTest
                 Console.WriteLine("KeyID={0} is identical to inserted one: {1}", kp2.KeyID.ToString(), kp2.KeyID.ToString() == kp1.KeyID.ToString());
             }
 
+            watch = Stopwatch.StartNew();
+            Console.WriteLine("Resetting key store...");
+            keyStore.ResetPool();
+            Console.WriteLine("Done in {0} ms.", watch.ElapsedMilliseconds);
+
             Console.ReadLine();
         }
     }