mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-20 01:09:48 +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();
|
$difficulty = $remote->getdifficulty();
|
||||||
if(is_array($difficulty))
|
if(is_array($difficulty))
|
||||||
$coin->rpcencoding = 'POS';
|
$coin->rpcencoding = 'POS';
|
||||||
|
else if ($coin->symbol == 'DCR')
|
||||||
|
$coin->rpcencoding = 'DCR';
|
||||||
else
|
else
|
||||||
$coin->rpcencoding = 'POW';
|
$coin->rpcencoding = 'POW';
|
||||||
}
|
}
|
||||||
|
@ -169,8 +171,9 @@ function BackendCoinsUpdate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(strpos($remote->error, "not enough voters") || $coin->rpcencoding == 'DCR') {
|
else if ($coin->rpcencoding == 'DCR')
|
||||||
// ignore temporary gbt errors, we use getwork
|
{
|
||||||
|
$coin->auto_ready = ($coin->connections > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue