Beispiel #1
0
        public string GetPoolAboutMetrics()
        {
            string html = "<table>";
            string sql  = "Select sum(Hashrate) hr From Leaderboard";
            double dHR  = gData.GetScalarDouble(sql, "hr");

            sql = "Select count(bbpaddress) ct from Leaderboard";
            double dCt = gData.GetScalarDouble(sql, "ct");

            html += GetTR("Miners", dCt.ToString());
            html += GetTR("Speed", UICommon.GetHPSLabel(dHR));

            //html += GetTR("Charity Address", GetBMSConfigurationKeyValue("MoneroAddress"));  (No Longer Used)

            html += GetTR("Contact E-Mail", GetBMSConfigurationKeyValue("OperatorEmailAddress"));
            html += GetTR("Pool Fees XMR", "1% (minexmr.com)");
            html += GetTR("Pool Fees BBP", Math.Round(GetDouble(GetBMSConfigurationKeyValue("PoolFee")) * 100, 2) + "%");
            html += GetTR("Block Bonus", Math.Round(GetDouble(GetBMSConfigurationKeyValue("PoolBlockBonus")), 0) + " BBP Per Block");

            html += GetTR("Build Version", PoolCommon.pool_version.ToString());
            html += GetTR("Startup Time", PoolCommon.start_date.ToString());

            UInt64 iTarget = UInt64.Parse(Common._pool._template.target.Substring(0, 12), System.Globalization.NumberStyles.HexNumber);
            double dDiff   = 655350.0 / iTarget;
            string sHeight = PoolCommon.nGlobalHeight.ToString() + " (Diff: " + Math.Round(dDiff, 2) + ")";

            html += GetTR("Difficulty", dDiff.ToString());

            html += GetTR("Height", PoolCommon.nGlobalHeight.ToString());
            html += GetTR("Job Count", PoolCommon.dictJobs.Count().ToString());
            html += GetTR("Thread Count", PoolCommon.iXMRThreadCount.ToString());

            html += GetTR("Worker Count", PoolCommon.dictWorker.Count().ToString());

            sql = "Select sum(shares) suc, sum(fails) fail from Share (nolock) where updated > getdate()-1";
            double ts24  = gData.GetScalarDouble(sql, "suc");
            double tis24 = gData.GetScalarDouble(sql, "fail");

            html += GetTR("Total Shares (24 hours)", ts24.ToString());
            html += GetTR("Total Invalid Shares (24 hours)", tis24.ToString());

            sql = "Select count(distinct height) h from Share (nolock) where updated > getdate()-1 and subsidy > 0 and reward > .05";
            double tbf24 = gData.GetScalarDouble(sql, "h");

            html += GetTR("Total Blocks Found (24 hours)", tbf24.ToString());

            html += "</table>";
            return(html);
        }