mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 09:27:25 +00:00
stratum: cover LBC with DCR tricks
This commit is contained in:
parent
4cb3e7ed16
commit
ce5d2d3030
3 changed files with 7 additions and 6 deletions
|
@ -319,7 +319,8 @@ bool client_update_block(YAAMP_CLIENT *client, json_value *json_params)
|
|||
coind->newblock = true;
|
||||
coind->notreportingcounter = 0;
|
||||
|
||||
if (!strcmp("DCR", coind->rpcencoding)) {
|
||||
if (!strcmp("DCR", coind->rpcencoding) || !strcmp("LBC", coind->rpcencoding))
|
||||
{
|
||||
usleep(300 * YAAMP_MS);
|
||||
}
|
||||
|
||||
|
|
|
@ -281,8 +281,8 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL
|
|||
target_to_diff(coin_target), target_to_diff(hash_int),
|
||||
hash1, submitvalues->hash_be, templ->has_segwit_txs);
|
||||
|
||||
if(!strcmp("DCR", coind->rpcencoding)) {
|
||||
// delay between dcrd and dcrwallet
|
||||
if(!strcmp("DCR", coind->rpcencoding) ||!strcmp("LBC", coind->rpcencoding)) {
|
||||
// delay between dcrd/lbcd and dcrwallet/lbcwallet
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -239,8 +239,8 @@ YAAMP_JOB_TEMPLATE *coind_create_template(YAAMP_COIND *coind)
|
|||
json_value *json = rpc_call(&coind->rpc, "getblocktemplate", params);
|
||||
if(!json || json_is_null(json))
|
||||
{
|
||||
// coind_error() reset auto_ready, and DCR gbt can fail
|
||||
if (strcmp(coind->rpcencoding, "DCR") == 0)
|
||||
// coind_error() reset auto_ready, and DCR/LBC gbt can fail
|
||||
if (!strcmp(coind->rpcencoding, "DCR") || !strcmp(coind->rpcencoding, "LBC"))
|
||||
debuglog("decred getblocktemplate failed\n");
|
||||
else
|
||||
coind_error(coind, "getblocktemplate");
|
||||
|
|
Loading…
Add table
Reference in a new issue