Bitcoin Forum
May 05, 2024, 05:24:41 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Litecoin + Pushpool + mmcfe  (Read 2791 times)
ajnozari (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
October 02, 2012, 09:21:10 PM
 #1

Ok,

So now that I've gotten over the newbie restriction,

I saw in this post  https://bitcointalk.org/index.php?topic=76372.0 that Tittiez fixed the hashrate issue in mmcfe.  I have everything up and running but I can't for the life of me figure out how to fix this problem, it's acutally getting on my nerves at this point. Also, if anyone can recommend any other frontend that works, as in NOT simplecoin (working on getting that one up) please let me know because I have everything up and running... except for the front end.
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
vitruvio
Sr. Member
****
Offline Offline

Activity: 850
Merit: 331



View Profile
October 03, 2012, 02:50:17 PM
Last edit: October 03, 2012, 04:20:53 PM by vitruvio
 #2

At least you have all running btu not me Cheesy, the cronjobs to update the pool fail the 2 that uses bitcoinclient class, so cronjob.php and archive.php.

Code:
XML-RPC: xmlrpcmsg::parseResponseHeaders: HTTP error, got response: HTTP/1.1 Not Found
PHP Fatal error:  Uncaught BitcoinClientException: [0]: Didn't receive 200 Oom remote server. (HTTP/1.1 404 Not Found)

  thrown in  on line 0

Did you faced that problem?

Regards

EDIT: The problem was the the function to get block number, is different from to btc to LTC, so in both files change:
Code:
$currentBlockNumber = $bitcoinController->getblocknumber();

by

Code:
$currentBlockNumber = $bitcoinController->query("getblockcount");
vitruvio
Sr. Member
****
Offline Offline

Activity: 850
Merit: 331



View Profile
October 03, 2012, 03:15:46 PM
 #3

Ok,

So now that I've gotten over the newbie restriction,

I saw in this post  https://bitcointalk.org/index.php?topic=76372.0 that Tittiez fixed the hashrate issue in mmcfe.  I have everything up and running but I can't for the life of me figure out how to fix this problem, it's acutally getting on my nerves at this point. Also, if anyone can recommend any other frontend that works, as in NOT simplecoin (working on getting that one up) please let me know because I have everything up and running... except for the front end.

To your problem I've found this mod of hashrate.php that seems to give correct values on MH/s.

http://pastebin.com/aj86DsJx


I've added $retarget as variable to requiredFuntions.php, maybe is needed in other files, when make more changes.

Code:
<?php

$includeDirectory 
"/var/www/includes/";

include(
$includeDirectory."requiredFunctions.php");

//Hashrate by worker
$sql =  "SELECT IFNULL(sum(a.id),0) as id, p.username FROM pool_worker p LEFT JOIN ".
"((SELECT count(id) as id, username ".
"FROM shares ".
"WHERE time > DATE_SUB(now(), INTERVAL 10 MINUTE) ".
"GROUP BY username) ".
"UNION ".
"(SELECT count(id) as id, username ".
"FROM shares_history ".
"WHERE time > DATE_SUB(now(), INTERVAL 10 MINUTE) ".
"GROUP BY username)) a ".
"ON p.username=a.username ".
"GROUP BY username";
$result mysql_query($sql);
while (
$resultrow mysql_fetch_object($result)) {
$retarget 17;
$hashrate $resultrow->id;
$key bcpow(2,$retarget) or die("bcpow err");
$hashrate round((($hashrate*$key)/600)/10003);
mysql_query("UPDATE pool_worker SET hashrate = $hashrate WHERE username = '$resultrow->username'");
}

//Total Hashrate (more exact than adding)
$sql =  "SELECT sum(a.id) as id FROM ".
"((SELECT count(id) as id FROM shares WHERE time > DATE_SUB(now(), INTERVAL 10 MINUTE)) ".
"UNION ".
"(SELECT count(id) as id FROM shares_history WHERE time > DATE_SUB(now(), INTERVAL 10 MINUTE)) ".
") a ";
$result mysql_query($sql);
if (
$resultrow mysql_fetch_object($result)) {
$retarget 17;
$hashrate $resultrow->id;
        
$key bcpow(2,$retarget) or die("bcpow err");
        
$hashrate round((($hashrate*$key)/600)/10003);
mysql_query("UPDATE settings SET value = '$hashrate' WHERE setting='currenthashrate'");
}

//Hashrate by user
$sql "SELECT u.id, IFNULL(sum(p.hashrate),0) as hashrate ".
"FROM webUsers u LEFT JOIN pool_worker p ".
"ON p.associatedUserId = u.id ".
"GROUP BY id";
$result mysql_query($sql);
while (
$resultrow mysql_fetch_object($result)) {
mysql_query("UPDATE webUsers SET hashrate = $resultrow->hashrate WHERE id = $resultrow->id");

// Enable this for lots of stats for graphing
if ($resultrow->hashrate 0) {
mysql_query("INSERT INTO userHashrates (userId, hashrate) VALUES ($resultrow->id$resultrow->hashrate)"); // active users hashrate
}
}

mysql_query("INSERT INTO userHashrates (userId, hashrate) VALUES (0, $hashrate)"); // the pool total hashrate

$currentTime time();
mysql_query("update settings set value='$currentTime' where setting='statstime'");

// Clean up the userHashrate table (anything older than 4 days)
mysql_query("DELETE FROM userHashrates WHERE timestamp < DATE_SUB(now(), INTERVAL 96 HOUR)");

?>

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!