Added RTM block ID function

This commit is contained in:
MoneroOcean
2021-12-09 01:12:27 +00:00
parent 5548c6de53
commit 170d0c0ec9
2 changed files with 6 additions and 2 deletions

View File

@@ -164,10 +164,14 @@ function update_merkle_root_hash(offset, payload, blob_in, blob_out) {
getMerkleRoot(transactions).copy(blob_out, 4 + 32);
};
module.exports.blockHashBuff = function(blobBuffer) {
return reverseBuffer(hash256(blobBuffer));
};
module.exports.convertRavenBlob = function(blobBuffer) {
let header = blobBuffer.slice(0, 80);
update_merkle_root_hash(80 + 8 + 32, false, blobBuffer, header);
return reverseBuffer(hash256(header));
return module.exports.blockHashBuff(header);
};
module.exports.constructNewRavenBlob = function(blockTemplate, nonceBuff, mixhashBuff) {

View File

@@ -1,6 +1,6 @@
{
"name": "cryptoforknote-util",
"version": "11.0.1",
"version": "11.0.2",
"main": "cryptoforknote-util",
"author": {
"name": "LucasJones",