mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-04-11 21:39:16 +02:00
reorder STRATUM_V1_submit_share params to fit api
This commit is contained in:
parent
ba384294b5
commit
2171e55e14
@ -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
|
@ -298,16 +298,14 @@ int STRATUM_V1_authenticate(int socket, const char * username)
|
||||
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,
|
||||
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",
|
||||
|
@ -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
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user