Added autolykos2 support
This commit is contained in:
10
index.js
10
index.js
@@ -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)
|
||||||
|
};
|
||||||
};
|
};
|
||||||
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user