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:
parent
266d31271a
commit
c851f39598
1
miner.h
1
miner.h
@ -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
5
util.c
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user