Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b402ceb37f | |||
| f31a2751ab |
@@ -189,4 +189,14 @@ module.exports.EthBlockTemplate = function(rpcData) {
|
|||||||
difficulty: difficulty,
|
difficulty: difficulty,
|
||||||
height: parseInt(rpcData[3])
|
height: parseInt(rpcData[3])
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports.ErgBlockTemplate = function(rpcData) {
|
||||||
|
const difficulty = module.exports.baseDiff().div(bignum(rpcData.b)).toNumber();
|
||||||
|
return {
|
||||||
|
hash: rpcData.msg,
|
||||||
|
hash2: rpcData.pk,
|
||||||
|
difficulty: difficulty,
|
||||||
|
height: parseInt(rpcData.h)
|
||||||
|
};
|
||||||
};
|
};
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cryptoforknote-util",
|
"name": "cryptoforknote-util",
|
||||||
"version": "9.2.0",
|
"version": "10.0.0",
|
||||||
"main": "cryptoforknote-util",
|
"main": "cryptoforknote-util",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "LucasJones",
|
"name": "LucasJones",
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"promise": "*",
|
"promise": "*",
|
||||||
"bindings": "*",
|
"bindings": "*",
|
||||||
"nan": "^2.0.0",
|
"nan": "^2.14.2",
|
||||||
"bignum": "^0.13.1",
|
"bignum": "^0.13.1",
|
||||||
"sha3": "*",
|
"sha3": "*",
|
||||||
"varuint-bitcoin": "^1.0.4",
|
"varuint-bitcoin": "^1.0.4",
|
||||||
|
|||||||
Reference in New Issue
Block a user