Skip to content

Commit

Permalink
One minor potential bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hashtobewild committed Sep 22, 2018
1 parent 1f46444 commit 0e1c958
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,10 @@ var pool = module.exports = function pool(options, authorizeFn) {
return;
}

if (isNaN(rpcResults.getdifficulty) && 'proof-of-stake' in rpcResults.getdifficulty)
options.coin.reward = 'POS';
else
options.coin.reward = 'POW';
if (isNaN(rpcResults.getdifficulty) && 'proof-of-stake' in rpcResults.getdifficulty)
options.coin.reward = 'POS';
else
options.coin.reward = 'POW';


/* POS coins must use the pubkey in coinbase transaction, and pubkey is
Expand All @@ -438,7 +438,7 @@ var pool = module.exports = function pool(options, authorizeFn) {
return util.addressToScript(rpcResults.validateaddress.address);
})();

options.testnet = rpcResults.getblockchaininfo.chain === "test";
options.testnet = options.coin.hasGetInfo ? rpcResults.getblockchaininfo.chain === "test" : rpcResults.getinfo.testnet;
options.protocolVersion = options.coin.hasGetInfo ? rpcResults.getinfo.protocolversion : rpcResults.getnetworkinfo.protocolversion;

var tempDifficulty = options.coin.hasGetInfo ? rpcResults.getinfo.difficulty : rpcResults.getblockchaininfo.difficulty;
Expand Down

0 comments on commit 0e1c958

Please sign in to comment.