Browse Source

API don't change 'Diff1 Shares' - backward compatability FTW

nfactor-troky
Kano 12 years ago
parent
commit
17973c59c4
  1. 1
      API-README
  2. 2
      api.c
  3. 9
      miner.php

1
API-README

@ -391,7 +391,6 @@ Added API commands:
'setconfig|name,N' 'setconfig|name,N'
Modified API commands: Modified API commands:
Change pool field name 'Diff1 Shares' to 'Diff1 Work'
'devs' - add 'Diff1 Work', 'Difficulty Accepted', 'Difficulty Rejected', 'devs' - add 'Diff1 Work', 'Difficulty Accepted', 'Difficulty Rejected',
'Last Share Difficulty' to all devices 'Last Share Difficulty' to all devices
'gpu|N' - add 'Diff1 Work', 'Difficulty Accepted', 'gpu|N' - add 'Diff1 Work', 'Difficulty Accepted',

2
api.c

@ -1882,7 +1882,7 @@ static void poolstatus(__maybe_unused SOCKETTYPE c, __maybe_unused char *param,
root = api_add_uint(root, "Remote Failures", &(pool->remotefail_occasions), false); root = api_add_uint(root, "Remote Failures", &(pool->remotefail_occasions), false);
root = api_add_escape(root, "User", pool->rpc_user, false); root = api_add_escape(root, "User", pool->rpc_user, false);
root = api_add_time(root, "Last Share Time", &(pool->last_share_time), false); root = api_add_time(root, "Last Share Time", &(pool->last_share_time), false);
root = api_add_int(root, "Diff1 Work", &(pool->diff1), false); root = api_add_int(root, "Diff1 Shares", &(pool->diff1), false);
if (pool->rpc_proxy) { if (pool->rpc_proxy) {
root = api_add_const(root, "Proxy Type", proxytype(pool->rpc_proxytype), false); root = api_add_const(root, "Proxy Type", proxytype(pool->rpc_proxytype), false);
root = api_add_escape(root, "Proxy", pool->rpc_proxy, false); root = api_add_escape(root, "Proxy", pool->rpc_proxy, false);

9
miner.php

@ -799,12 +799,11 @@ function fmt($section, $name, $value, $when, $alldata)
case 'SUMMARY.Discarded': case 'SUMMARY.Discarded':
case 'POOL.Discarded': case 'POOL.Discarded':
case 'total.Discarded': case 'total.Discarded':
case 'POOL.Diff1 Shares':
case 'total.Diff1 Shares':
case 'GPU.Diff1 Work': case 'GPU.Diff1 Work':
case 'PGA.Diff1 Work': case 'PGA.Diff1 Work':
case 'POOL.Diff1 Work':
case 'total.Diff1 Work': case 'total.Diff1 Work':
case 'POOL.Diff1 Shares': // old name
case 'total.Diff1 Shares': // old name
$parts = explode('.', $value, 2); $parts = explode('.', $value, 2);
if (count($parts) == 1) if (count($parts) == 1)
$dec = ''; $dec = '';
@ -893,7 +892,7 @@ $singlerigsum = array(
'Hardware Errors' => 1, 'Utility' => 1, 'Total MH' => 1), 'Hardware Errors' => 1, 'Utility' => 1, 'Total MH' => 1),
'pools' => array('Getworks' => 1, 'Accepted' => 1, 'Rejected' => 1, 'Discarded' => 1, 'pools' => array('Getworks' => 1, 'Accepted' => 1, 'Rejected' => 1, 'Discarded' => 1,
'Stale' => 1, 'Get Failures' => 1, 'Remote Failures' => 1, 'Stale' => 1, 'Get Failures' => 1, 'Remote Failures' => 1,
'Diff1 Work' => 1), 'Diff1 Shares' => 1),
'notify' => array('*' => 1)); 'notify' => array('*' => 1));
# #
function showtotal($total, $when, $oldvalues) function showtotal($total, $when, $oldvalues)
@ -2100,7 +2099,7 @@ function display()
newtable(); newtable();
doforeach('version', 'rig summary', array(), array(), true); doforeach('version', 'rig summary', array(), array(), true);
$sum = array('MHS av', 'Getworks', 'Found Blocks', 'Accepted', 'Rejected', 'Discarded', 'Stale', 'Utility', 'Local Work', 'Total MH', 'Work Utility', 'Diff1 Work'); $sum = array('MHS av', 'Getworks', 'Found Blocks', 'Accepted', 'Rejected', 'Discarded', 'Stale', 'Utility', 'Local Work', 'Total MH', 'Work Utility', 'Diff1 Shares', 'Diff1 Work');
doforeach('summary', 'summary information', $sum, array(), false); doforeach('summary', 'summary information', $sum, array(), false);
endtable(); endtable();
otherrow('<td><br><br></td>'); otherrow('<td><br><br></td>');

Loading…
Cancel
Save