Skip to content

Commit

Permalink
Block majors and minors are now confirmed to work with XMRIG.
Browse files Browse the repository at this point in the history
  • Loading branch information
sumlnoether committed Apr 1, 2018
1 parent 8456837 commit 53ecd52
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,12 @@ NAN_METHOD(convert_blob) {
if (!construct_parent_block(b, parent_block))
return THROW_ERROR_EXCEPTION("Failed to construct parent block");

// Set the blocks to the right major and minor versions.
parent_block.major_version = b.major_version;
parent_block.minor_version = b.minor_version;
if (!get_block_hashing_blob(parent_block, output))
return THROW_ERROR_EXCEPTION("Failed to create mining block");

// Set the right values for the mining block. This is not the best solution.
output[0] = (char) b.major_version;
output[1] = (char) b.minor_version;
}

v8::Local<v8::Value> returnValue = Nan::CopyBuffer((char*)output.data(), output.size()).ToLocalChecked();
Expand Down

0 comments on commit 53ecd52

Please sign in to comment.