From 53ecd523f695eeb1df46865acaa1a5799c7c000f Mon Sep 17 00:00:00 2001 From: Suml Noether Date: Sun, 1 Apr 2018 23:43:19 +0000 Subject: [PATCH] Block majors and minors are now confirmed to work with XMRIG. --- src/main.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.cc b/src/main.cc index 18dcf2bc..a4c2ac42 100644 --- a/src/main.cc +++ b/src/main.cc @@ -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 returnValue = Nan::CopyBuffer((char*)output.data(), output.size()).ToLocalChecked();