Skip to content

Commit

Permalink
Merge pull request MoneroOcean#6 from sumlnoether/master
Browse files Browse the repository at this point in the history
Block majors and minors are now confirmed to work with XMRIG.
  • Loading branch information
sumlnoether authored Apr 1, 2018
2 parents 83f1bfd + 53ecd52 commit ff72e93
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 ff72e93

Please sign in to comment.