|
|
@@ -67,31 +67,7 @@ struct stratumsrv_conn {
|
|
|
|
|
|
static struct stratumsrv_conn *_ssm_connections;
|
|
|
|
|
|
-static
|
|
|
-void _ssm_gen_dummy_work(struct work * const work, struct stratum_work * const swork, const struct timeval * const tvp_prepared, const char * const extranonce2, const uint32_t xnonce1)
|
|
|
-{
|
|
|
- uint8_t *p, *s;
|
|
|
-
|
|
|
- *work = (struct work){
|
|
|
- .pool = swork->pool,
|
|
|
- .work_restart_id = swork->work_restart_id,
|
|
|
- .tv_staged = *tvp_prepared,
|
|
|
- };
|
|
|
- bytes_resize(&work->nonce2, swork->n2size);
|
|
|
- s = bytes_buf(&work->nonce2);
|
|
|
- p = &s[swork->n2size - _ssm_client_xnonce2sz];
|
|
|
- if (extranonce2)
|
|
|
- hex2bin(p, extranonce2, _ssm_client_xnonce2sz);
|
|
|
-#ifndef __OPTIMIZE__
|
|
|
- else
|
|
|
- memset(p, '\0', _ssm_client_xnonce2sz);
|
|
|
-#endif
|
|
|
- p -= _ssm_client_octets;
|
|
|
- memcpy(p, &xnonce1, _ssm_client_octets);
|
|
|
- if (p != s)
|
|
|
- memset(s, '\xbb', p - s);
|
|
|
- gen_stratum_work2(work, swork);
|
|
|
-}
|
|
|
+#define _ssm_gen_dummy_work work2d_gen_dummy_work
|
|
|
|
|
|
static
|
|
|
bool stratumsrv_update_notify_str(struct pool * const pool, bool clean)
|