Browse Source

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

nfactor-troky
Con Kolivas 12 years ago
parent
commit
a4e78be1ed
  1. 2
      cgminer.c
  2. 4
      miner.h

2
cgminer.c

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

4
miner.h

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

Loading…
Cancel
Save