diff --git a/index.js b/index.js index 2c39e1f..b957b91 100644 --- a/index.js +++ b/index.js @@ -84,14 +84,13 @@ module.exports.RavenBlockTemplate = function(rpcData, poolAddress) { txCoinbase.addOutput(new Buffer(rpcData.default_witness_commitment, 'hex'), 0); } } - const merkleRoot = new Buffer('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD', 'hex'); // 32 bytes let header = new Buffer(80); { let position = 0; header.writeUInt32BE(rpcData.height, position, 4); // height 42-46 header.write(rpcData.bits, position += 4, 4, 'hex'); // bits 47-50 header.writeUInt32BE(rpcData.curtime, position += 4, 4, 'hex'); // nTime 51-54 - header.write(merkleRoot, position += 4, 32, 'hex'); // merkelRoot 55-87 + header.write('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD', position += 4, 32, 'hex'); // merkelRoot 55-87 header.write(rpcData.previousblockhash, position += 32, 32, 'hex'); // prevblockhash 88-120 header.writeUInt32BE(rpcData.version, position += 32, 4); // version 121-153 header = reverseBuffer(header); diff --git a/package.json b/package.json index 4eda270..0e20f9f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cryptoforknote-util", - "version": "9.0.11", + "version": "9.0.12", "main": "cryptoforknote-util", "author": { "name": "LucasJones",