mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
stratum: add logs in coind_create_job()
This commit is contained in:
parent
4cb3e7ed16
commit
940375b900
2 changed files with 12 additions and 4 deletions
|
@ -304,9 +304,15 @@ bool client_update_block(YAAMP_CLIENT *client, json_value *json_params)
|
||||||
}
|
}
|
||||||
|
|
||||||
int coinid = json_params->u.array.values[1]->u.integer;
|
int coinid = json_params->u.array.values[1]->u.integer;
|
||||||
if(!coinid) return false;
|
if(!coinid) {
|
||||||
|
debuglog("client_update_block(): object_find() coin id failed\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
YAAMP_COIND *coind = (YAAMP_COIND *)object_find(&g_list_coind, coinid, true);
|
YAAMP_COIND *coind = (YAAMP_COIND *)object_find(&g_list_coind, coinid, true);
|
||||||
if(!coind) return false;
|
if(!coind) {
|
||||||
|
debuglog("client_update_block(): can't find coind for coinid:%d\n", coinid);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const char* hash = json_params->u.array.values[2]->u.string.ptr;
|
const char* hash = json_params->u.array.values[2]->u.string.ptr;
|
||||||
|
|
||||||
|
|
|
@ -523,10 +523,12 @@ bool coind_create_job(YAAMP_COIND *coind, bool force)
|
||||||
if(!templ)
|
if(!templ)
|
||||||
{
|
{
|
||||||
CommonUnlock(&coind->mutex);
|
CommonUnlock(&coind->mutex);
|
||||||
// debuglog("%s: create job template failed!\n", coind->symbol);
|
stratumlog("%s: create job template failed!\n", coind->symbol);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stratumlog("templ->height: %d, coind->height: %d\n", templ->height, coind->height);
|
||||||
|
|
||||||
YAAMP_JOB *job_last = coind->job;
|
YAAMP_JOB *job_last = coind->job;
|
||||||
|
|
||||||
if( !force && job_last && job_last->templ && job_last->templ->created + 45 > time(NULL) &&
|
if( !force && job_last && job_last->templ && job_last->templ->created + 45 > time(NULL) &&
|
||||||
|
@ -592,7 +594,7 @@ bool coind_create_job(YAAMP_COIND *coind, bool force)
|
||||||
g_list_job.AddTail(coind->job);
|
g_list_job.AddTail(coind->job);
|
||||||
CommonUnlock(&coind->mutex);
|
CommonUnlock(&coind->mutex);
|
||||||
|
|
||||||
// debuglog("coind_create_job %s %d new job %x\n", coind->name, coind->height, coind->job->id);
|
debuglog("coind_create_job %s %d new job %x\n", coind->name, coind->height, coind->job->id);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue