예제 #1
0
        public void TestGetTotalBahtMiningFromBsodPerday()
        {
            MiningCalculator calc = new MiningCalculator();

            calc.MyHashRate = 120000000L;
            double miningManoBahtPerDay = calc.GetTotalFiatMoneyMiningPerday("MANO", PoolName.Bsod, ExchangeName.CryptoBridge, FiatCurrency.THB);
            double miningIfxBahtPerDay  = calc.GetTotalFiatMoneyMiningPerday("IFX", PoolName.Bsod, ExchangeName.CryptoBridge, FiatCurrency.THB);
            double miningGinBahtPerDay  = calc.GetTotalFiatMoneyMiningPerday("GIN", PoolName.Bsod, ExchangeName.CryptoBridge, FiatCurrency.THB);
            double miningVtlBahtPerDay  = calc.GetTotalFiatMoneyMiningPerday("VTL", PoolName.Bsod, ExchangeName.CryptoBridge, FiatCurrency.THB);
            double miningMctBahtPerDay  = calc.GetTotalFiatMoneyMiningPerday("MCT", PoolName.Bsod, ExchangeName.CryptoBridge, FiatCurrency.THB);
            double miningGtmBahtPerDay  = calc.GetTotalFiatMoneyMiningPerday("GTM", PoolName.Bsod, ExchangeName.CryptoBridge, FiatCurrency.THB);
            double miningMeriBahtPerDay = calc.GetTotalFiatMoneyMiningPerday("MERI", PoolName.Bsod, ExchangeName.CryptoBridge, FiatCurrency.THB);
            double miningFxTCBahtPerDay = calc.GetTotalFiatMoneyMiningPerday("FXTC", PoolName.Bsod, ExchangeName.CryptoBridge, FiatCurrency.THB);
            double miningAlpsBahtPerDay = calc.GetTotalFiatMoneyMiningPerday("ALPS", PoolName.Bsod, ExchangeName.CryptoBridge, FiatCurrency.THB);
            double miningCrsBahtPerDay  = calc.GetTotalFiatMoneyMiningPerday("CRS", PoolName.Bsod, ExchangeName.CryptoBridge, FiatCurrency.THB);

            calc.MyHashRate = 350000000L;
            double miningXdnaBahtPerDay = calc.GetTotalFiatMoneyMiningPerday("XDNA", PoolName.Bsod, ExchangeName.CryptoBridge, FiatCurrency.THB);


            System.Diagnostics.Debug.WriteLine(string.Format("MANO = {0}", miningManoBahtPerDay));
            System.Diagnostics.Debug.WriteLine(string.Format("IFX = {0}", miningIfxBahtPerDay));
            System.Diagnostics.Debug.WriteLine(string.Format("GIN = {0}", miningGinBahtPerDay));
            System.Diagnostics.Debug.WriteLine(string.Format("VTL = {0}", miningVtlBahtPerDay));
            System.Diagnostics.Debug.WriteLine(string.Format("MCT = {0}", miningMctBahtPerDay));
            System.Diagnostics.Debug.WriteLine(string.Format("GTM = {0}", miningGtmBahtPerDay));
            System.Diagnostics.Debug.WriteLine(string.Format("MERI = {0}", miningMeriBahtPerDay));
            System.Diagnostics.Debug.WriteLine(string.Format("FxTC = {0}", miningFxTCBahtPerDay));
            System.Diagnostics.Debug.WriteLine(string.Format("APLS = {0}", miningAlpsBahtPerDay));
            System.Diagnostics.Debug.WriteLine(string.Format("CRS = {0}", miningCrsBahtPerDay));
            System.Diagnostics.Debug.WriteLine(string.Format("XDNA = {0}", miningXdnaBahtPerDay));


            Assert.AreEqual(true, miningManoBahtPerDay > 0);
        }
예제 #2
0
        public void TestGetMiningPriceAtCrex24PerdayByMultiGpu()
        {
            BsodAPI api = new BsodAPI();

            HashPower.SetupHardware("1080ti", 18);
            HashPower.SetupHardware("1070ti", 6);
            HashPower.SetupHardware("1070", 7);

            CryptoCurrency coins = api.LoadCurrency();

            MiningCalculator calc = new MiningCalculator();

            SortedDictionary <string, double> prices = new SortedDictionary <string, double>();

            foreach (string symbol in CurrencyName.Symbols)
            {
                if (coins[symbol] != null)
                {
                    double bahtPerDay = GetMiningBahtPerDay(symbol, coins[symbol].algo, PoolName.Bsod, ExchangeName.Crex24, calc);
                    prices.Add(symbol + " (" + coins[symbol].algo + ")", bahtPerDay);
                }
            }

            foreach (KeyValuePair <string, double> item in prices)
            {
                Debug.WriteLine(string.Format("{0} = {1} ", item.Key, item.Value));
            }

            Assert.AreEqual(0, 0);
        }
예제 #3
0
        public void TestGetBtcMiningPerDayFromZergPool()
        {
            long             myHashRate = 79000000L;
            MiningCalculator calc       = new MiningCalculator();

            calc.MyHashRate = myHashRate;
            double btcPerDay = calc.GetTotalBtcMiningPerday("lyra2z", PoolName.Zerg, true);

            Assert.AreEqual(true, btcPerDay > 0);
        }
예제 #4
0
        public void TestGetCoinPriceMiningPerday()
        {
            MiningCalculator calc = new MiningCalculator();

            calc.MyHashRate = 100000000L;
            double miningManoBtcPerDay = calc.GetTotalBtcMiningPerday("MANO", PoolName.Bsod, ExchangeName.CryptoBridge);
            double miningIfxBtcPerDay  = calc.GetTotalBtcMiningPerday("IFX", PoolName.Bsod, ExchangeName.CryptoBridge);
            double miningGinBtcPerDay  = calc.GetTotalBtcMiningPerday("GIN", PoolName.Bsod, ExchangeName.CryptoBridge);
            double miningVtlBtcPerDay  = calc.GetTotalBtcMiningPerday("VTL", PoolName.Bsod, ExchangeName.CryptoBridge);

            Assert.AreEqual(true, miningManoBtcPerDay > 0);
        }
예제 #5
0
        public void TestGetCoinPriceMiningPerdayByGpuName()
        {
            MiningCalculator calc     = new MiningCalculator();
            double           hashRate = HashPower.GetHashRate("1080ti", "lyra2z", 18);

            calc.MyHashRate = hashRate;
            double miningManoBtcPerDay = calc.GetTotalBtcMiningPerday("MANO", PoolName.Bsod, ExchangeName.CryptoBridge);
            double miningIfxBtcPerDay  = calc.GetTotalBtcMiningPerday("IFX", PoolName.Bsod, ExchangeName.CryptoBridge);
            double miningGinBtcPerDay  = calc.GetTotalBtcMiningPerday("GIN", PoolName.Bsod, ExchangeName.CryptoBridge);
            double miningVtlBtcPerDay  = calc.GetTotalBtcMiningPerday("VTL", PoolName.Bsod, ExchangeName.CryptoBridge);

            Assert.AreEqual(true, miningManoBtcPerDay > 0);
        }
예제 #6
0
        public void TestGetTotalBahtAutoBtcMiningPerDayFromZergPool()
        {
            string json  = System.IO.File.ReadAllText("myrig.json");
            Rig    myRig = JsonConvert.DeserializeObject <Rig>(json);

            HashPower.SetupHardware(myRig);

            MiningCalculator calc = new MiningCalculator();

            foreach (string algorithmName in AlgoritmName.Symbols)
            {
                calc.MyHashRate = HashPower.GetAlgorithmHashRate(algorithmName);
                double btcCurrentPerDay = calc.GetTotalFiatMoneyMiningPerday(algorithmName, PoolName.Zerg, true, FiatCurrency.THB);
                double btc24HoursPerDay = calc.GetTotalFiatMoneyMiningPerday(algorithmName, PoolName.Zerg, false, FiatCurrency.THB);
                Debug.WriteLine(string.Format("{0} estimate_current: {1} baht estimate_24hour: {2} baht ", algorithmName, btcCurrentPerDay.ToString("N2"), btc24HoursPerDay.ToString("N2")));
                Assert.AreEqual(true, btcCurrentPerDay > -1);
            }
        }
예제 #7
0
        public void TestGetNeoScryptPriceMiningPerdayFromBsod()
        {
            MiningCalculator calc     = new MiningCalculator();
            double           hashRate = HashPower.GetHashRate("1080ti", "lyra2z", 18);

            hashRate       += HashPower.GetHashRate("1070ti", "lyra2z", 6);
            hashRate       += HashPower.GetHashRate("1070", "lyra2z", 7);
            calc.MyHashRate = hashRate;

            System.Diagnostics.Debug.WriteLine(calc.MyHashRate);

            double miningGbxBtcPerDay = calc.GetTotalFiatMoneyMiningPerday("GBX", PoolName.Bsod, ExchangeName.CryptoBridge, FiatCurrency.THB);

            //      double miningLincBtcPerDay = calc.GetTotalBtcMiningPerday("LINC", PoolName.Bsod, ExchangeName.Crex24);
            //      double miningUfoBtcPerDay = calc.GetTotalBtcMiningPerday("UFO", PoolName.Bsod, ExchangeName.CryptoBridge);

            Assert.AreEqual(true, miningGbxBtcPerDay > 0);
        }
예제 #8
0
        public void TestGetAllCoinPriceMiningPerdayFromBsod()
        {
            MiningCalculator calc     = new MiningCalculator();
            double           hashRate = HashPower.GetHashRate("1080ti", "lyra2z", 18);

            hashRate       += HashPower.GetHashRate("1070ti", "lyra2z", 6);
            hashRate       += HashPower.GetHashRate("1070", "lyra2z", 7);
            calc.MyHashRate = hashRate;

            System.Diagnostics.Debug.WriteLine(calc.MyHashRate);

            double miningManoBtcPerDay = calc.GetTotalBtcMiningPerday("MANO", PoolName.Bsod, ExchangeName.CryptoBridge);
            double miningIfxBtcPerDay  = calc.GetTotalBtcMiningPerday("IFX", PoolName.Bsod, ExchangeName.CryptoBridge);
            double miningGinBtcPerDay  = calc.GetTotalBtcMiningPerday("GIN", PoolName.Bsod, ExchangeName.CryptoBridge);
            double miningVtlBtcPerDay  = calc.GetTotalBtcMiningPerday("VTL", PoolName.Bsod, ExchangeName.CryptoBridge);

            Assert.AreEqual(true, miningManoBtcPerDay > 0);
        }
예제 #9
0
        public void TestGetTotalBahtAllPoolAllExchange()
        {
            double  keepMoreThan = 0;
            BsodAPI bsod         = new BsodAPI();
            GosAPI  gos          = new GosAPI();

            string json  = System.IO.File.ReadAllText("myrig.json");
            Rig    myRig = JsonConvert.DeserializeObject <Rig>(json);

            HashPower.SetupHardware(myRig);

            Console.WriteLine("Start loading pool data. Please wait ...");
            MiningCalculator calc      = new MiningCalculator();
            CryptoCurrency   bsodCoins = calc.PoolCoins[0];
            CryptoCurrency   gosCoins  = calc.PoolCoins[1];

            Console.WriteLine("Analyzing ...");

            SortedDictionary <string, double> prices = new SortedDictionary <string, double>();
            StringBuilder result = new StringBuilder();

            foreach (string symbol in CurrencyName.Symbols)
            {
                if (bsodCoins != null && bsodCoins[symbol] != null)
                {
                    double bahtPerDay = GetMiningBahtPerDay(symbol, bsodCoins[symbol].algo, PoolName.Bsod, ExchangeName.CryptoBridge, calc);
                    if (bahtPerDay > keepMoreThan)
                    {
                        prices.Add(symbol + " (" + bsodCoins[symbol].algo + ") mining@bsod sale@crypto-bridge ", bahtPerDay);
                        result.AppendLine(string.Format("{0},{1},{2},{3},{4}", symbol, bsodCoins[symbol].algo, "bsod", "crypto-bridge", bahtPerDay));
                    }

                    bahtPerDay = GetMiningBahtPerDay(symbol, bsodCoins[symbol].algo, PoolName.Bsod, ExchangeName.Crex24, calc);
                    if (bahtPerDay > keepMoreThan)
                    {
                        prices.Add(symbol + " (" + bsodCoins[symbol].algo + ") mining@bsod sale@crex24", bahtPerDay);
                        result.AppendLine(string.Format("{0},{1},{2},{3},{4}", symbol, bsodCoins[symbol].algo, "bsod", "crex24", bahtPerDay));
                    }
                }

                if (gosCoins != null && gosCoins[symbol] != null)
                {
                    double bahtPerDay = GetMiningBahtPerDay(symbol, gosCoins[symbol].algo, PoolName.Gos, ExchangeName.CryptoBridge, calc);
                    if (bahtPerDay > keepMoreThan)
                    {
                        prices.Add(symbol + " (" + gosCoins[symbol].algo + ") mining@gos sale@crypto-bridge", bahtPerDay);
                        result.AppendLine(string.Format("{0},{1},{2},{3},{4}", symbol, gosCoins[symbol].algo, "gos", "crypto-bridge", bahtPerDay));
                    }

                    bahtPerDay = GetMiningBahtPerDay(symbol, gosCoins[symbol].algo, PoolName.Gos, ExchangeName.Crex24, calc);
                    if (bahtPerDay > keepMoreThan)
                    {
                        prices.Add(symbol + " (" + gosCoins[symbol].algo + ") mining@gos sale@crex24", bahtPerDay);
                        result.AppendLine(string.Format("{0},{1},{2},{3},{4}", symbol, gosCoins[symbol].algo, "gos", "crex24", bahtPerDay));
                    }
                }
            }

            Console.WriteLine("1080ti x 18 ");
            Console.WriteLine("1070ti x 6");
            Console.WriteLine("1070 x 7 ");


            foreach (KeyValuePair <string, double> item in prices)
            {
                if (item.Value > 0)
                {
                    string line = string.Format("{0} = {1} ", item.Key, item.Value);
                    Console.WriteLine(line);
                }
            }


            Assert.AreEqual(0, 0);
        }
예제 #10
0
        private static double GetMiningBahtPerDay(string coinSymbol, string algorithm, PoolName pool, ExchangeName exchangeName, MiningCalculator calc)
        {
            double hashRate = HashPower.GetAlgorithmHashRate(algorithm);

            calc.MyHashRate = hashRate;
            System.Diagnostics.Debug.WriteLine(string.Format("My hashrate of algor {0} = {1} ", algorithm, calc.MyHashRate));
            double bahtPerDay = calc.GetTotalFiatMoneyMiningPerday(coinSymbol, pool, exchangeName, FiatCurrency.THB);

            System.Diagnostics.Debug.WriteLine(string.Format("Total baht per day at {0} of {1} ==========> {2} Baht ", exchangeName, coinSymbol, bahtPerDay));
            return(bahtPerDay);
        }
예제 #11
0
        static void Main(string[] args)
        {
            Console.CancelKeyPress += Console_CancelKeyPress;
            BsodAPI bsod = new BsodAPI();
            GosAPI  gos  = new GosAPI();

            Console.WriteLine("Start loading pool data. Please wait ...");
            _calc = new MiningCalculator();

            ParseArgument(args);

            Rig myRig = ReadRigConfig("myrig.json");

            HashPower.SetupHardware(myRig);

            string input = "";

            while (input != Environment.NewLine && input != "q")
            {
                CryptoCurrency bsodCoins            = _calc.PoolCoins[0];
                CryptoCurrency gosCoins             = _calc.PoolCoins[1];
                CryptoCurrency iceCoins             = _calc.PoolCoins[2];
                Algorithm      zergAlgorithm        = _calc.PoolAlgorithms[0];
                Algorithm      phiAlgorithm         = _calc.PoolAlgorithms[1];
                Algorithm      zpoolAlgorithm       = _calc.PoolAlgorithms[2];
                Algorithm      ahashAlgorithm       = _calc.PoolAlgorithms[3];
                Algorithm      blockMasterAlgorithm = _calc.PoolAlgorithms[4];

                Console.WriteLine("Analyzing ...");

                #region monitor mode
                if (_needMonitor) // monitor mode
                {
                    foreach (GpuInfo gpu in myRig.Chipsets)
                    {
                        Console.WriteLine(string.Format("{0} x {1} ", gpu.Name, gpu.Count));
                    }
                    string algorithmName = _monitorCoin.ToLower();

                    Console.WriteLine("Monitoring " + zpoolAlgorithm[algorithmName] != null ? algorithmName : _monitorCoin);
                    Console.WriteLine();

                    string symbol = _monitorCoin;

                    _coinsResult.Clear();

                    ExploreMining(bsodCoins, symbol, PoolName.Bsod);
                    ExploreMining(gosCoins, symbol, PoolName.Gos);
                    ExploreMining(iceCoins, symbol, PoolName.IceMining);

                    // display result
                    _coinsResult.Sort();
                    foreach (CryptoCurrencyResult coin in _coinsResult)
                    {
                        string line = string.Format("{0} {1}(24hr)\t{2}@{3} \tsale@{4}", coin.h24_btc.ToString("N2"), _fiat, coin.symbol, coin.Pool, coin.Exchange);
                        Console.WriteLine(line);
                    }

                    if (zergAlgorithm[algorithmName] != null)
                    {
                        _calc.MyHashRate = HashPower.GetAlgorithmHashRate(algorithmName);
                        double btcCurrentPerDay = _calc.GetTotalFiatMoneyMiningPerday(algorithmName, PoolName.Zerg, true, _fiat);
                        double btc24HoursPerDay = _calc.GetTotalFiatMoneyMiningPerday(algorithmName, PoolName.Zerg, false, _fiat);

                        AlgorithmResult algorAtZerg = new AlgorithmResult();
                        algorAtZerg.name             = algorithmName;
                        algorAtZerg.Pool             = PoolName.Zerg;
                        algorAtZerg.estimate_current = btcCurrentPerDay;
                        algorAtZerg.estimate_last24h = btc24HoursPerDay;
                        _algorsResult.Add(algorAtZerg);

                        if (_needToShowCoinsNumPerDay)
                        {
                            ShowNumOfBtcMiningPerDay(algorithmName, PoolName.Zerg);
                        }
                    }


                    if (phiAlgorithm[algorithmName] != null)
                    {
                        _calc.MyHashRate = HashPower.GetAlgorithmHashRate(algorithmName);
                        double btcCurrentPerDay = _calc.GetTotalFiatMoneyMiningPerday(algorithmName, PoolName.PhiPhi, true, _fiat);
                        double btc24HoursPerDay = _calc.GetTotalFiatMoneyMiningPerday(algorithmName, PoolName.PhiPhi, false, _fiat);

                        AlgorithmResult algorAtPhi = new AlgorithmResult();
                        algorAtPhi.name             = algorithmName;
                        algorAtPhi.Pool             = PoolName.PhiPhi;
                        algorAtPhi.estimate_current = btcCurrentPerDay;
                        algorAtPhi.estimate_last24h = btc24HoursPerDay;
                        _algorsResult.Add(algorAtPhi);

                        if (_needToShowCoinsNumPerDay)
                        {
                            ShowNumOfBtcMiningPerDay(algorithmName, PoolName.PhiPhi);
                        }
                    }


                    if (ahashAlgorithm[algorithmName] != null)
                    {
                        _calc.MyHashRate = HashPower.GetAlgorithmHashRate(algorithmName);
                        double btcCurrentPerDay = _calc.GetTotalFiatMoneyMiningPerday(algorithmName, PoolName.AhashPool, true, _fiat);
                        double btc24HoursPerDay = _calc.GetTotalFiatMoneyMiningPerday(algorithmName, PoolName.AhashPool, false, _fiat);

                        AlgorithmResult algorAtAhash = new AlgorithmResult();
                        algorAtAhash.name             = algorithmName;
                        algorAtAhash.Pool             = PoolName.AhashPool;
                        algorAtAhash.estimate_current = btcCurrentPerDay;
                        algorAtAhash.estimate_last24h = btc24HoursPerDay;
                        _algorsResult.Add(algorAtAhash);

                        if (_needToShowCoinsNumPerDay)
                        {
                            ShowNumOfBtcMiningPerDay(algorithmName, PoolName.AhashPool);
                        }
                    }

                    if (blockMasterAlgorithm[algorithmName] != null)
                    {
                        _calc.MyHashRate = HashPower.GetAlgorithmHashRate(algorithmName);
                        double btcCurrentPerDay = _calc.GetTotalFiatMoneyMiningPerday(algorithmName, PoolName.BlockMaster, true, _fiat);
                        double btc24HoursPerDay = _calc.GetTotalFiatMoneyMiningPerday(algorithmName, PoolName.BlockMaster, false, _fiat);

                        AlgorithmResult algorAtBlockMaster = new AlgorithmResult();
                        algorAtBlockMaster.name             = algorithmName;
                        algorAtBlockMaster.Pool             = PoolName.BlockMaster;
                        algorAtBlockMaster.estimate_current = btcCurrentPerDay;
                        algorAtBlockMaster.estimate_last24h = btc24HoursPerDay;
                        _algorsResult.Add(algorAtBlockMaster);

                        if (_needToShowCoinsNumPerDay)
                        {
                            ShowNumOfBtcMiningPerDay(algorithmName, PoolName.BlockMaster);
                        }
                    }

                    if (zpoolAlgorithm[algorithmName] != null)
                    {
                        _calc.MyHashRate = HashPower.GetAlgorithmHashRate(algorithmName);
                        double btcCurrentPerDay = _calc.GetTotalFiatMoneyMiningPerday(algorithmName, PoolName.Zpool, true, _fiat);
                        double btc24HoursPerDay = _calc.GetTotalFiatMoneyMiningPerday(algorithmName, PoolName.Zpool, false, _fiat);

                        AlgorithmResult algorAtZpool = new AlgorithmResult();
                        algorAtZpool.name             = algorithmName;
                        algorAtZpool.Pool             = PoolName.Zpool;
                        algorAtZpool.estimate_current = btcCurrentPerDay;
                        algorAtZpool.estimate_last24h = btc24HoursPerDay;
                        _algorsResult.Add(algorAtZpool);

                        if (_needToShowCoinsNumPerDay)
                        {
                            ShowNumOfBtcMiningPerDay(algorithmName, PoolName.Zpool);
                        }
                    }

                    _algorsResult.Sort();
                    foreach (AlgorithmResult algor in _algorsResult)
                    {
                        string line = string.Format("{0} {1}(24hr)\t{2} {3}(current) \t{4}@{5}", algor.estimate_last24h.ToString("N2"), _fiat, algor.estimate_current.ToString("N2"), _fiat, algor.name, algor.Pool);
                        Console.WriteLine(line);
                        _result.AppendLine(string.Format("{0},{1},{2},{3},{4}", algor.name, algor.Pool, "bx", algor.estimate_last24h.ToString("F2"), algor.estimate_current.ToString("F2")));
                    }


                    _calc.RefreshPool();


                    if (_needWriteFile)
                    {
                        System.IO.File.WriteAllText(_filename, _result.ToString());
                        Console.WriteLine("File {0} saved.", _filename);
                    }
                }
                #endregion monitor mode

                #region normal mode
                else // normal mode
                {
                    foreach (string symbol in CurrencyName.Symbols)
                    {
                        ExploreMining(bsodCoins, symbol, PoolName.Bsod);
                        ExploreMining(gosCoins, symbol, PoolName.Gos);
                        ExploreMining(iceCoins, symbol, PoolName.IceMining);
                    }

                    _coinsResult.Sort();

                    // display

                    Console.WriteLine();
                    Console.WriteLine("Analyzing gpu ...");
                    foreach (GpuInfo gpu in myRig.Chipsets)
                    {
                        Console.WriteLine(string.Format("{0} x {1} ", gpu.Name, gpu.Count));
                    }
                    Console.WriteLine();

                    foreach (CryptoCurrencyResult coin in _coinsResult)
                    {
                        string line = string.Format("{0} {1}(24hr)\t{2}@{3} \tsale@{4}", coin.h24_btc.ToString("N2"), _fiat, coin.symbol, coin.Pool, coin.Exchange);
                        _result.AppendLine(string.Format("{0},{1},{2},{3},{4}", coin.symbol, coin.algo, coin.Pool, coin.Exchange, coin.h24_btc.ToString("F2")));
                        Console.WriteLine(line);
                    }

                    Console.WriteLine();
                    Console.WriteLine("Analyzing auto btc pool ...");
                    Console.WriteLine();

                    foreach (string algorithmName in AlgoritmName.Symbols)
                    {
                        _calc.MyHashRate = HashPower.GetAlgorithmHashRate(algorithmName);
                        ExploreMiningDetail(algorithmName, PoolName.Zerg);
                        ExploreMiningDetail(algorithmName, PoolName.PhiPhi);
                        ExploreMiningDetail(algorithmName, PoolName.AhashPool);
                        ExploreMiningDetail(algorithmName, PoolName.Zpool);
                        ExploreMiningDetail(algorithmName, PoolName.BlockMaster);
                    }

                    _algorsResult.Sort();
                    foreach (AlgorithmResult algor in _algorsResult)
                    {
                        string line = string.Format("{0} {1}(24hr)  \t{2} {3}(current) \t{4}@{5}", algor.estimate_last24h.ToString("N2"), _fiat, algor.estimate_current.ToString("N2"), _fiat, algor.name, algor.Pool);
                        Console.WriteLine(line);
                        _result.AppendLine(string.Format("{0},{1},{2},{3},{4}", algor.name, algor.Pool, "bx", algor.estimate_last24h.ToString("F2"), algor.estimate_current.ToString("F2")));
                    }


                    if (_needWriteFile)
                    {
                        System.IO.File.WriteAllText(_filename, _result.ToString());
                        Console.WriteLine("File {0} saved.", _filename);
                    }
                }
                #endregion normal mode

                #region dig mode
                if (_needDig)
                {
                    Console.WriteLine();
                    DoMining();
                }
                #endregion dig mode

                if (_miners != null)
                {
                    Console.WriteLine();
                    Console.WriteLine(string.Format("Next watch in {0} hour.", _miners.SwapTime));
                    int sleepTime = _miners.SwapTime > int.MaxValue ? 3600000 : (int)(_miners.SwapTime * 3600000);
                    System.Threading.Thread.Sleep(sleepTime);

                    Console.WriteLine("Start reloading pool data. Please wait ...");
                    _calc.RefreshPool();
                    _calc.RefreshPrice();
                }
                else
                {
                    Console.ReadLine();
                    return;
                }
            }
        }