stratum: fix height displayed for AUX debug logs

This commit is contained in:
Tanguy Pruvot 2016-06-09 14:56:49 +02:00
parent 53638b1d90
commit b2aa3d9ffd
2 changed files with 3 additions and 3 deletions

View file

@ -193,14 +193,14 @@ static void client_do_submit(YAAMP_CLIENT *client, YAAMP_JOB *job, YAAMP_JOB_VAL
bool b = coind_submitgetauxblock(coind_aux, coind_aux->aux.hash, block_hex);
if(b)
{
debuglog("*** ACCEPTED %s %d\n", coind_aux->name, coind_aux->height+1);
debuglog("*** ACCEPTED %s %d (+1)\n", coind_aux->name, coind_aux->height);
block_add(client->userid, client->workerid, coind_aux->id, coind_aux->height, target_to_diff(coin_target_aux),
target_to_diff(hash_int), coind_aux->aux.hash, "");
}
else
debuglog("%s %d rejected\n", coind_aux->name, coind_aux->height+1);
debuglog("%s %d REJECTED\n", coind_aux->name, coind_aux->height);
}
}

View file

@ -266,7 +266,7 @@ void block_confirm(int coinid, const char *blockhash)
for(CLI li = g_list_block.first; li; li = li->next)
{
YAAMP_BLOCK *block = (YAAMP_BLOCK *)li->data;
if(block->coinid == coinid)
if(block->coinid == coinid && !block->confirmed && !block->deleted)
{
if(strcmp(block->hash1, hash) && strcmp(block->hash2, hash)) continue;
debuglog("*** CONFIRMED %d : %s\n", block->height, block->hash2);