Пример #1
0
 public void RepositoryCanTrackAddresses()
 {
     using (var tester = RepositoryTester.Create(true))
     {
         tester.Repository.Track(pubKey);
         RepositoryCanTrackAddresses(tester);
     }
 }
Пример #2
0
 public void RepositoryCanTrackCallbacks()
 {
     using (var tester = RepositoryTester.Create(true))
     {
         tester.Repository.AddBlockCallback(new Uri("http://toto/")).GetAwaiter().GetResult();
         tester.Repository.AddBlockCallback(new Uri("http://toto1/")).GetAwaiter().GetResult();
         var uris = tester.Repository.GetBlockCallbacks().GetAwaiter().GetResult();
         Assert.Equal(2, uris.Length);
     }
 }
Пример #3
0
 public void CanSerializeKeyPathFast()
 {
     using (var tester = RepositoryTester.Create(true))
     {
         var seria   = new Serializer(Network.RegTest);
         var keyInfo = new KeyPathInformation()
         {
             DerivationStrategy = DummyPubKey, Feature = DerivationFeature.Change, KeyPath = new KeyPath("0/1"), Redeem = Script.Empty, ScriptPubKey = Script.Empty
         };
         var str = seria.ToString(keyInfo);
         for (int i = 0; i < 1500; i++)
         {
             seria.ToObject <KeyPathInformation>(str);
         }
     }
 }