reorder STRATUM_V1_submit_share params to fit api

This commit is contained in:
Ben 2023-06-09 08:30:51 -04:00 committed by johnny9
parent ba384294b5
commit 2171e55e14
3 changed files with 10 additions and 6 deletions

View File

@ -69,7 +69,7 @@ void STRATUM_V1_configure_version_rolling(int socket);
int STRATUM_V1_suggest_difficulty(int socket, uint32_t difficulty);
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 char * extranonce_2, const uint32_t ntime, const uint32_t nonce);
#endif // STRATUM_API_H

View File

@ -298,16 +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)
const char * extranonce_2, const uint32_t ntime, const uint32_t nonce)
{
char submit_msg[BUFFER_SIZE];
sprintf(submit_msg, "{\"id\": %d, \"method\": \"mining.submit\", \"params\": [\"%s\", \"%s\", \"%s\", \"%08x\", \"%08x\"]}\n",

View File

@ -128,8 +128,14 @@ void ASIC_task(void * pvParameters)
{
SYSTEM_notify_found_nonce(&GLOBAL_STATE->SYSTEM_MODULE, active_jobs[nonce.job_id]->pool_diff);
STRATUM_V1_submit_share(GLOBAL_STATE->sock, STRATUM_USER, active_jobs[nonce.job_id]->jobid, active_jobs[nonce.job_id]->ntime,
active_jobs[nonce.job_id]->extranonce2, nonce.nonce);
STRATUM_V1_submit_share(
GLOBAL_STATE->sock,
STRATUM_USER,
active_jobs[nonce.job_id]->jobid,
active_jobs[nonce.job_id]->extranonce2,
active_jobs[nonce.job_id]->ntime,
nonce.nonce
);
}