diff --git a/miner.h b/miner.h index e9982b7a..4523302c 100644 --- a/miner.h +++ b/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; diff --git a/util.c b/util.c index 4d2d7d95..3ab12368 100644 --- a/util.c +++ b/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: