This commit is contained in:
Ben 2023-06-09 08:08:37 -04:00 committed by johnny9
parent 8755a8fcbc
commit ba384294b5
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,9 @@
/******************************************************************************
* *
* References:
* 1. Stratum Protocol - [link](https://reference.cash/mining/stratum-protocol)
*****************************************************************************/
#include "stratum_api.h"
#include "cJSON.h"
#include <string.h>
@ -292,6 +298,14 @@ int STRATUM_V1_authenticate(int socket, const char * username)
return 1;
}
/// @param socket Socket to write to
/// @param username The clients 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,
const uint32_t ntime, const char * extranonce_2, const uint32_t nonce)
{

View File

@ -50,6 +50,8 @@ void ASIC_task(void * pvParameters)
struct job_packet job;
// 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;
job.job_id = id;
job.num_midstates = 1;