示例#1
0
                $oddeven = 1;
            }
            $value['balance'] -= $maxbal;
            $alltotal += $maxbal;
            $total = 0;
            $blocks++;
            $paynum++;
        } else {
            $qt .= "<TR {$oe}><TD>{$paynum}</TD><TD><A HREF=\"/~wizkid057/newstats/userstats.php/{$key}\" id =\"{$key}\">{$key}</A></TD> <TD>" . prettyDuration(time() - $value['oldest']) . "</TD><TD>" . prettySatoshis($value['balance']) . "</TD></TR>";
            if ($oddeven) {
                $oe = " class=\"oddblockconfirmed\"";
                $oddeven = 0;
            } else {
                $oe = " class=\"blockconfirmed\"";
                $oddeven = 1;
            }
            $total += $value['balance'];
            $alltotal += $value['balance'];
            $value['balance'] = 0;
            $paynum++;
        }
    }
}
$qt .= "</TABLE>";
print "Total: " . prettySatoshis($alltotal) . "<BR>";
print "Block Count: {$blocks}<BR><BR>";
print $qt;
if ($lt10tbcc) {
    print "<SMALL>Note: There are also {$lt10tbcc} address" . ($lt10tbcc != 1 ? 'es' : '') . " with timeout balances less than 10 TBC but more than 2 TBC, totalling " . prettySatoshis($lt10tbc) . " which are not included in the automated payout queue and will be paid manually.</SMALL><BR><BR>";
}
print_stats_bottom();
示例#2
0
/**
 * Format a BTC amount in BTC.
 * @param int|float|string $btc amount of BTC
 * @return string formatted amount
 */
function prettyBTC($btc)
{
    return prettySatoshis(bcadd(0, bcdiv($btc, '0.00000001', 8), 0));
}
示例#3
0
                $aheadtext = prettySatoshis($tb + 2500000000 * $bc) . " " . ($tb + 2500000000 * ($bc + 1) == 1 ? "is" : "are") . " ahead in queue";
            }
        }
        if ($bc == 0) {
            $delay = "in our next block";
        } else {
            $delay = "after a {$bc} block delay";
        }
        print $aheadtext . ", putting this user's payout {$delay}.<BR><SMALL style=\"font-size: 70%\"><I>Note: This is constantly changing. See <A HREF=\"http://eligius.st/~wizkid057/newstats/payoutqueue.php#{$givenuser}\">the payout queue</A>.</I></SMALL>";
    }
    print "</span>";
    print "<BR><BR><HR>";
}
if ($u16avghash > 0) {
    if (!isset($netdiff)) {
        $sql = "select id,(pow(10,((29-hex_to_int(substr(encode(solution,'hex'),145,2)))::double precision*2.4082399653118495617099111577959::double precision)+log(  (65535::double precision /  hex_to_int(substr(encode(solution,'hex'),147,6)))::double precision   )::double precision))::double precision as network_difficulty from shares where server={$serverid} and our_result=true order by id desc limit 1;";
        $result = pg_exec($link, $sql);
        $row = pg_fetch_array($result, 0);
        $netdiff = $row["network_difficulty"];
    }
    $satoshiperday = round($u16avghash * 86400 / 4294967296 * (2500000000 / $netdiff), 0);
    $netdiff = round($netdiff, 2);
    print "<BR><B>Estimated Earnings</B><BR>";
    print "<span style=\"font-size: 0.8em\">";
    print "Your approximate maximum potential earnings at the current network difficulty of " . number_format($netdiff, 2) . " and maintaining your 3-hour average hash rate of " . prettyHashrate($u16avghash) . " is " . prettySatoshis($satoshiperday) . " per day.\n";
    print "</span>";
    print "<BR><BR><HR>";
}
print "</div>";
print "<BR><SMALL>(The data on this page is cached and updated periodically, generally about 30 seconds for the short-timeframe hashrate numbers, balances, and rejected shares data; and about 675 seconds for the graphs, longer-timeframe hashrate numbers, and other datas.</SMALL><BR>";
print_stats_bottom();
示例#4
0
    }
    if ($nickname != "") {
        if ($dolink == 1) {
            $address = "<A HREF=\"../userstats.php/{$addr}\">{$nickname}<BR><FONT SIZE=\"-3\">({$addr})</FONT></A>";
        } else {
            $address = "{$nickname}<BR><FONT SIZE=\"-3\">({$addr})</FONT>";
        }
    } else {
        $address = "<A HREF=\"../userstats.php/{$addr}\">{$addr}</A>";
    }
    print "<TR HEIGHT=\"38\" {$oclass}><TD>{$address}</TD><TD>{$pammt}</TD></TR>";
    $total += $ammt * 100000000;
}
print "</TABLE>";
if ($block["height"] >= 261279) {
    # TODO: Make compliant with reward halving
    $fees = $total - 2500000000;
    $rf = 0;
    if ($fees > 500000000) {
        $fees = 500000000;
        $rf = 1;
    }
    print "<BR>Block transactions fees put towards share log: " . prettySatoshis($fees) . "<BR>";
    if ($rf == 1) {
        print "Note: Block had an unusually large amount of transaction fees.  Some fees may have been held from immediate payout pending investigation into their origin.<BR>";
    }
}
if ($failsafe) {
    print "<BR><B>Note:</B> This block did not contain automated miner payouts due to a reward system failsafe trigger, and instead paid the pool's offline wallet for use in a standard payout later.<BR>This <B>is normal</B> and happens occasionally when one or more variables cause the reward system to temporarily remove automatic payouts from the coinbase transaction being mined (slight delay making payouts stale, quick network blocks in succession, quick pool blocks in succession, etc).<BR>Be assured that funds paid to the pool offline wallet will be used to pay miners manually soon after this block confirms.<BR>";
}
print_stats_bottom();