mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-06 18:49:45 +00:00
decred: auto toggle ready flag with connection count
unlike other coins, decred ignore getblocktemplate error This prevent miners to mine without possible reward in this special case.
This commit is contained in:
parent
60e1938289
commit
0fd1d490df
1 changed files with 5 additions and 2 deletions
|
@ -87,6 +87,8 @@ function BackendCoinsUpdate()
|
|||
$difficulty = $remote->getdifficulty();
|
||||
if(is_array($difficulty))
|
||||
$coin->rpcencoding = 'POS';
|
||||
else if ($coin->symbol == 'DCR')
|
||||
$coin->rpcencoding = 'DCR';
|
||||
else
|
||||
$coin->rpcencoding = 'POW';
|
||||
}
|
||||
|
@ -169,8 +171,9 @@ function BackendCoinsUpdate()
|
|||
}
|
||||
}
|
||||
|
||||
else if(strpos($remote->error, "not enough voters") || $coin->rpcencoding == 'DCR') {
|
||||
// ignore temporary gbt errors, we use getwork
|
||||
else if ($coin->rpcencoding == 'DCR')
|
||||
{
|
||||
$coin->auto_ready = ($coin->connections > 0);
|
||||
}
|
||||
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue