1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-10 23:08:07 +00:00

Store session id for stratum if the pool supports it for future mining.resume support.

This commit is contained in:
Con Kolivas 2013-02-15 14:46:30 +11:00
parent 266d31271a
commit c851f39598
2 changed files with 6 additions and 0 deletions

View File

@ -941,6 +941,7 @@ struct pool {
size_t n1_len;
uint32_t nonce2;
int n2size;
char *sessionid;
bool has_stratum;
bool stratum_active;
bool stratum_auth;

5
util.c
View File

@ -1478,6 +1478,11 @@ bool initiate_stratum(struct pool *pool)
applog(LOG_INFO, "Failed to get n2size in initiate_stratum");
goto out;
}
pool->sessionid = json_array_string(res_val, 3);
if (pool->sessionid)
applog(LOG_DEBUG, "Pool %d stratum session id: %s", pool->pool_no, pool->sessionid);
else
applog(LOG_DEBUG, "Pool %d stratum session id does not exist");
ret = true;
out: