mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-06-11 14:40:57 +02:00
comments
This commit is contained in:
parent
8755a8fcbc
commit
ba384294b5
@ -1,3 +1,9 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* *
|
||||||
|
* References:
|
||||||
|
* 1. Stratum Protocol - [link](https://reference.cash/mining/stratum-protocol)
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "stratum_api.h"
|
#include "stratum_api.h"
|
||||||
#include "cJSON.h"
|
#include "cJSON.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -292,6 +298,14 @@ int STRATUM_V1_authenticate(int socket, const char * username)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// @param socket Socket to write to
|
||||||
|
/// @param username The client’s user name.
|
||||||
|
/// @param jobid The job ID for the work being submitted.
|
||||||
|
/// @param ntime The hex-encoded time value use in the block header.
|
||||||
|
/// @param extranonce_2 The hex-encoded value of extra nonce 2.
|
||||||
|
/// @param nonce The hex-encoded nonce value to use in the block header.
|
||||||
|
|
||||||
void STRATUM_V1_submit_share(int socket, const char * username, const char * jobid,
|
void STRATUM_V1_submit_share(int socket, const char * username, const char * jobid,
|
||||||
const uint32_t ntime, const char * extranonce_2, const uint32_t nonce)
|
const uint32_t ntime, const char * extranonce_2, const uint32_t nonce)
|
||||||
{
|
{
|
||||||
|
@ -50,6 +50,8 @@ void ASIC_task(void * pvParameters)
|
|||||||
|
|
||||||
struct job_packet job;
|
struct job_packet job;
|
||||||
// max job number is 128
|
// max job number is 128
|
||||||
|
// there is still some really weird logic with the job id bits for the asic to sort out
|
||||||
|
// so we have it limited to 128 and it has to increment by 4
|
||||||
id = (id + 4) % 128;
|
id = (id + 4) % 128;
|
||||||
job.job_id = id;
|
job.job_id = id;
|
||||||
job.num_midstates = 1;
|
job.num_midstates = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user