change to client submit data(m_sendBuf -> char array)
This commit is contained in:
parent
8d61df7cc9
commit
55634db2da
1 changed files with 4 additions and 2 deletions
|
@ -168,12 +168,14 @@ int64_t Client::submit(const JobResult &result)
|
||||||
const char *nonce = result.nonce;
|
const char *nonce = result.nonce;
|
||||||
const char *data = result.result;
|
const char *data = result.result;
|
||||||
# else
|
# else
|
||||||
char *nonce = m_sendBuf;
|
char nonce[9];
|
||||||
char *data = m_sendBuf + 16;
|
char data[65];
|
||||||
|
|
||||||
|
memset(nonce, 0, 9);
|
||||||
Job::toHex(reinterpret_cast<const unsigned char*>(&result.nonce), 4, nonce);
|
Job::toHex(reinterpret_cast<const unsigned char*>(&result.nonce), 4, nonce);
|
||||||
nonce[8] = '\0';
|
nonce[8] = '\0';
|
||||||
|
|
||||||
|
memset(data, 0, 65);
|
||||||
Job::toHex(result.result, 32, data);
|
Job::toHex(result.result, 32, data);
|
||||||
data[64] = '\0';
|
data[64] = '\0';
|
||||||
# endif
|
# endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue