Beispiel #1
0
        public void doStartPoolChecking()
        {
            new Thread(() =>
            {
                isPoolChecking = true;
                while (this != null && isPoolChecking && !string.IsNullOrEmpty(Config.configAccount))
                {
                    Pool mPool = new PoolBLL().get(Config.configPool);
                    if (mPool != null && !string.IsNullOrEmpty(mPool.poolApiUrl))
                    {
                        int indexOfDot = Config.configAccount.IndexOf(".");

                        ResultPoolApiWallet mResultPoolApiWallet = new PoolApi().getWallet(
                            mPool.poolApiUrl,
                            indexOfDot > -1 ? Config.configAccount.Substring(0, Config.configAccount.IndexOf(".")) : Config.configAccount,
                            Config.configCoin
                            );
                        if (mResultPoolApiWallet != null)
                        {
                            BeginInvoke(new Action(() =>
                            {
                                lbUnpaidCount.Text    = mResultPoolApiWallet.unpaid;
                                lbPaidIn24hCount.Text = mResultPoolApiWallet.paid24h;
                                lbEarnedCount.Text    = mResultPoolApiWallet.total;
                            }));
                        }
                    }
                    else
                    {
                        isPoolChecking = false;
                    }
                    Thread.Sleep(120 * 1000);
                }
            }).Start();
        }
Beispiel #2
0
 private void UploadHashsTimer_Elapsed(object sender, ElapsedEventArgs e)
 {
     try
     {
         PoolApi.SaveHashRates();
     }
     catch (Exception ex)
     {
         LogHelper.Error(ex.ToString());
     }
 }
Beispiel #3
0
 private void SaveHashRates()
 {
     PoolApi.SaveHashRates();
 }
Beispiel #4
0
 private void SaveBlockRates()
 {
     PoolApi.SaveBlockRates();
 }