public void RepositoryCanTrackAddresses() { using (var tester = RepositoryTester.Create(true)) { tester.Repository.Track(pubKey); RepositoryCanTrackAddresses(tester); } }
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); } }
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); } } }