Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better organize last 15 bytes of solution #15

Merged
merged 2 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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