Skip to content

Commit

Permalink
Better organize last 15 bytes of solution (monkins1010#15)
Browse files Browse the repository at this point in the history
* Update ccminer.cpp

* Update verusscan.cpp
  • Loading branch information
hellcatz authored May 26, 2023
1 parent ac12b21 commit 9704c1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ccminer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1970,8 +1970,8 @@ static void *miner_thread(void *userdata)
nonceptr[0]++; //??

if (opt_algo == ALGO_EQUIHASH) {
nonceptr[1] = (rand()*4);
nonceptr[2] |= thr_id; //try was nonceptr[1] |= thr_id << 24 monkins edit
//nonceptr[1] = (rand()*4);
nonceptr[2] |= ( thr_id ) + ((rand()*4) << 24); //try was nonceptr[1] |= thr_id << 24 monkins edit
//applog_hex(&work.data[27], 32);
}

Expand Down
6 changes: 3 additions & 3 deletions verus/verusscan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ extern "C" int scanhash_verus(int thr_id, struct work *work, uint32_t max_nonce,
memset(full_data + 4 + 32 + 32 + 32 + 4, 0, 4); // nBits
memset(full_data + 4 + 32 + 32 + 32 + 4 + 4, 0, 32); // nNonce
memset(sol_data + 3 + 8, 0, 64); // hashPrevMMRRoot, hashBlockMMRRoot
memcpy(nonceSpace, &pdata[EQNONCE_OFFSET - 3], 4 ); // transfer the nonce values that would be in the header to
memcpy(nonceSpace + 4, &pdata[EQNONCE_OFFSET + 1], 4 ); // the 15 bytes available
memcpy(nonceSpace + 8, &pdata[EQNONCE_OFFSET + 2], 1 );
memcpy(nonceSpace, &pdata[EQNONCE_OFFSET - 3], 7 ); // transfer the nonce values that would be in the header to
// memcpy(nonceSpace + 4, &pdata[EQNONCE_OFFSET + 1], 3 ); // the 15 bytes available
memcpy(nonceSpace + 7, &pdata[EQNONCE_OFFSET + 2], 4 );
}

uint32_t vhash[8] = { 0 };
Expand Down

0 comments on commit 9704c1c

Please sign in to comment.