Ejemplo n.º 1
0
        private static async Task <bool> IsTransactionDBMatch(string hash, DataSet ds)
        {
            var provider = new EthMonolithicProvider(EthereumConnectionTest.Address, ConfigManager.KeyStore, ConfigManager.Config.Password);

            if (!await provider.UseAddress(hash))
            {
                return(false);
            }

            return(DataSetConverterTest.IsSetSame(ds, provider.DataSet));
        }
Ejemplo n.º 2
0
        public async Task PublishedDataSetShouldMatch()
        {
            var provider = new EthMonolithicProvider(EthereumConnectionTest.Address, ConfigManager.KeyStore,
                                                     ConfigManager.Config.Password, DataSetTestContent.DS)
            {
                GasPrice = GasPriceWei
            };
            var info = await provider.CommitAsync();

            Assert.IsTrue(info.Success);
            Assert.AreEqual(61708, info.Cost.BaseCost);
            Assert.IsTrue(await IsTransactionDBMatch(info.Hash, DataSetTestContent.DS));
        }