Draft implementation of Ravencoin utils
This commit is contained in:
2
index.js
2
index.js
@@ -122,7 +122,7 @@ module.exports.RavenBlockTemplate = function(rpcData, poolAddress) {
|
||||
const seed_hash = seedhash_buf.toString('hex');
|
||||
|
||||
const diff1 = 0x00000000ff000000000000000000000000000000000000000000000000000000;
|
||||
const difficulty = parseFloat((diff1 / bignum(rpcData.target, 16).toNumber()).toFixed(9))
|
||||
const difficulty = parseFloat((diff1 / bignum(rpcData.target, 16).toNumber()).toFixed(9));
|
||||
|
||||
return {
|
||||
blocktemplate_blob: blob,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"bindings": "*",
|
||||
"nan": "^2.0.0",
|
||||
"bignum": "^0.13.1",
|
||||
"sha3": "git+https://github.com/phusion/node-sha3.git#7b88fc1c559c06b7b236c81d87cccbe4c6e7acd4",
|
||||
"sha3": "*",
|
||||
"bitcoinjs-lib": "git+https://github.com/bitcoinjs/bitcoinjs-lib.git#533d6c2e6d0aa4111f7948b1c12003cf6ef83137",
|
||||
"merkle-bitcoin": "git+https://github.com/joshuayabut/merkle-bitcoin.git#ec00ae20ba60d444e150ead03c747695ddaa83a1"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user