Browse Source

Bugfix: Ensure nonces are put in data as little-endian in test_nonce*

Luke Dashjr 13 years ago
parent
commit
945b7e1f29
1 changed files with 1 additions and 1 deletions
  1. 1 1
      miner.c

+ 1 - 1
miner.c

@@ -4376,7 +4376,7 @@ enum test_nonce2_result hashtest2(const struct work *work, bool checktarget)
 enum test_nonce2_result _test_nonce2(struct work *work, uint32_t nonce, bool checktarget)
 {
 	uint32_t *work_nonce = (uint32_t *)(work->data + 64 + 12);
-	*work_nonce = nonce;
+	*work_nonce = htole32(nonce);
 
 	if (opt_scrypt)
 		return TNR_GOOD;