Пример #1
0
        //[Trait("UnitTest", "UnitTest")]
        public static void CanPushTxBlockr()
        {
            var repo   = new BlockrTransactionRepository(Network.Main);
            var result = repo.Get("c3462373f1a722c66cbb1b93712df94aa7b3731f4142cd8413f10c9e872927de");

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

            var pushPath = BlockrTransactionRepository.BroadcastPath;

            try
            {
                BlockrTransactionRepository.BroadcastPath = "tx/decode";
                repo.BroadcastAsync(result).GetAwaiter().GetResult();
            }
            finally
            {
                BlockrTransactionRepository.BroadcastPath = pushPath;
            }
        }