Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b402ceb37f | |||
| f31a2751ab |
@@ -189,4 +189,14 @@ module.exports.EthBlockTemplate = function(rpcData) {
|
||||
difficulty: difficulty,
|
||||
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",
|
||||
"version": "9.2.0",
|
||||
"version": "10.0.0",
|
||||
"main": "cryptoforknote-util",
|
||||
"author": {
|
||||
"name": "LucasJones",
|
||||
@@ -13,7 +13,7 @@
|
||||
"dependencies": {
|
||||
"promise": "*",
|
||||
"bindings": "*",
|
||||
"nan": "^2.0.0",
|
||||
"nan": "^2.14.2",
|
||||
"bignum": "^0.13.1",
|
||||
"sha3": "*",
|
||||
"varuint-bitcoin": "^1.0.4",
|
||||
|
||||
Reference in New Issue
Block a user