GR support

This commit is contained in:
MoneroOcean
2021-11-30 16:27:45 +00:00
parent 5d33cf7e90
commit 494e6aa059
2 changed files with 0 additions and 4 deletions

View File

@@ -154,14 +154,12 @@ module.exports.RavenBlockTemplate = function(rpcData, poolAddress) {
function update_merkle_root_hash(offset, payload, blob_in, blob_out) {
const nTransactions = varuint.decode(blob_in, offset);
console.log("2x" + nTransactions);
offset += varuint.decode.bytes;
let transactions = [];
for (let i = 0; i < nTransactions; ++i) {
const tx = bitcoin.Transaction.fromBuffer(blob_in.slice(offset), true, payload && i == 0);
transactions.push(tx);
offset += tx.byteLength();
console.log("2xx " + tx.byteLength());
}
getMerkleRoot(transactions).copy(blob_out, 4 + 32);
};

2
rtm.js
View File

@@ -253,8 +253,6 @@ module.exports.RtmBlockTemplate = function(rpcData, poolAddress) {
let bits = Buffer.from(rpcData.bits, 'hex');
bits.writeUInt32LE(bits.readUInt32BE());
console.log("1x" + (rpcData.transactions.length + 1) + " " + (blob1.length + extraNoncePlaceholderLength + blob2.length));
return {
difficulty: parseFloat((diff1 / bignum(rpcData.target, 16).toNumber()).toFixed(9)),
height: rpcData.height,