1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-08-26 05:41:55 +00:00

Flip all 80 bytes in the flip function which was wrongly named flip256 for its purpose.

This commit is contained in:
Con Kolivas 2012-11-05 14:56:57 +11:00
parent 8bc677a6ca
commit a4e78be1ed
2 changed files with 3 additions and 3 deletions

View File

@ -2300,7 +2300,7 @@ static bool submit_upstream_work(struct work *work, CURL *curl, bool resubmit)
char gbt_block[1024], *varint, *header; char gbt_block[1024], *varint, *header;
unsigned char data[80]; unsigned char data[80];
flip256(data, work->data); flip80(data, work->data);
header = bin2hex(data, 80); header = bin2hex(data, 80);
sprintf(gbt_block, "%s", header); sprintf(gbt_block, "%s", header);
free(header); free(header);

View File

@ -544,13 +544,13 @@ static inline void swab256(void *dest_p, const void *src_p)
dest[7] = swab32(src[0]); dest[7] = swab32(src[0]);
} }
static inline void flip256(void *dest_p, const void *src_p) static inline void flip80(void *dest_p, const void *src_p)
{ {
uint32_t *dest = dest_p; uint32_t *dest = dest_p;
const uint32_t *src = src_p; const uint32_t *src = src_p;
int i; int i;
for (i = 0; i < 8; i++) for (i = 0; i < 20; i++)
dest[i] = swab32(src[i]); dest[i] = swab32(src[i]);
} }