Skip to content
Permalink
Browse files

Compatible with Bitcoin Gold Core v0.17.1

  • Loading branch information
h4x3rotab committed Apr 5, 2019
1 parent bd501f4 commit 292332f7ca77d6ef8119fea0e8f08c7b9e0eb6ec
Showing with 10 additions and 8 deletions.
  1. +2 −2 lib/daemon.js
  2. +7 −6 lib/pool.js
  3. +1 −0 lib/transactions.js
@@ -37,7 +37,7 @@ function DaemonInterface(daemons, logger) {
}

function isOnline(callback) {
cmd('getinfo', [], function (results) {
cmd('getblockchaininfo', [], function (results) {
var allOnline = results.every(function (result) {
return !results.error;
});
@@ -189,4 +189,4 @@ function DaemonInterface(daemons, logger) {

DaemonInterface.prototype.__proto__ = events.EventEmitter.prototype;

exports.interface = DaemonInterface;
exports.interface = DaemonInterface;
@@ -149,7 +149,7 @@ var pool = module.exports = function pool(options, authorizeFn) {

var generateProgress = function () {

_this.daemon.cmd('getinfo', [], function (results) {
_this.daemon.cmd('getblockchaininfo', [], function (results) {
var blockCount = results.sort(function (a, b) {
return b.response.blocks - a.response.blocks;
})[0].response.blocks;
@@ -369,7 +369,8 @@ var pool = module.exports = function pool(options, authorizeFn) {
var batchRpcCalls = [
['validateaddress', [options.address]],
['getdifficulty', []],
['getinfo', []],
['getblockchaininfo', []],
['getnetworkinfo', []],
['getmininginfo', []],
['submitblock', []]
];
@@ -415,12 +416,12 @@ var pool = module.exports = function pool(options, authorizeFn) {
return util.addressToScript(rpcResults.validateaddress.address);
})();

options.testnet = rpcResults.getinfo.testnet;
options.protocolVersion = rpcResults.getinfo.protocolversion;
options.testnet = rpcResults.getblockchaininfo.chain == 'test';
options.protocolVersion = rpcResults.getnetworkinfo.protocolversion;

options.initStats = {
connections: rpcResults.getinfo.connections,
difficulty: rpcResults.getinfo.difficulty * algos[options.coin.algorithm].multiplier,
connections: rpcResults.getnetworkinfo.connections,
difficulty: rpcResults.getblockchaininfo.difficulty * algos[options.coin.algorithm].multiplier,
networkHashRate: rpcResults.getmininginfo.networkhashps
};

@@ -32,6 +32,7 @@ function scriptFoundersCompile(address){


exports.createGeneration = function(rpcData, blockReward, feeReward, recipients, poolAddress){
console.warn('createGeneration:', poolAddress);
var poolAddrHash = bitcoin.address.fromBase58Check(poolAddress).hash;
var tx = new bitcoin.Transaction();
var blockHeight = parseInt(rpcData.height);

0 comments on commit 292332f

Please sign in to comment.
You can’t perform that action at this time.