Пример #1
0
        public static void CanRequestTransactionOnRapidBase()
        {
            var repo   = new RapidBaseTransactionRepository("http://rapidbase-test.azurewebsites.net/");
            var result = repo.Get("c3462373f1a722c66cbb1b93712df94aa7b3731f4142cd8413f10c9e872927de");

            Assert.NotNull(result);
            Assert.Equal("c3462373f1a722c66cbb1b93712df94aa7b3731f4142cd8413f10c9e872927de", result.GetHash().ToString());

            result = repo.Get("c3462373f1a722c66cbb1b93712df94aa7b3731f4142cd8413f10c9e872927df");
            Assert.Null(result);
        }
Пример #2
0
        //[Fact]
        public static void Play()
        {
            Stopwatch watch = new Stopwatch();

            watch.Start();
            System.Net.ServicePointManager.DefaultConnectionLimit = 100;
            System.Net.ServicePointManager.Expect100Continue      = false;
            var repo    = new RapidBaseTransactionRepository("http://rapidbase-test.azurewebsites.net/");
            var colored = new OpenAsset.NoSqlColoredTransactionRepository(repo);


            var result = repo
                         .Get("c3462373f1a722c66cbb1b93712df94aa7b3731f4142cd8413f10c9e872927de")
                         .GetColoredTransaction(colored);

            watch.Stop();
            //for(int i = 0 ; i < 100 ; i++)
            //{
            //	using(var node = Node.ConnectToLocal(Network.Main))
            //	{
            //		node.VersionHandshake();
            //		var chain = new ConcurrentChain(Network.Main);
            //		node.SynchronizeChain(chain);
            //	}
            //}
        }