Make pool hex configurable (#8)

For too long we've been asked to edit transactions.js. NO MORE! A sister commit will be pushed to s-nomp that will complement this commit.
This commit is contained in:
Beshoy Girgis 2018-08-11 05:23:38 -05:00 committed by GitHub
parent 25904d97af
commit e5abc7d3de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -14,6 +14,7 @@ var BlockTemplate = module.exports = function BlockTemplate(
extraNoncePlaceholder,
recipients,
poolAddress,
poolHex,
coin
) {
//private members
@ -61,6 +62,7 @@ var BlockTemplate = module.exports = function BlockTemplate(
this.rewardFees,
recipients,
poolAddress,
poolHex,
coin,
masternodeReward,
masternodePayee,

View File

@ -123,6 +123,7 @@ var JobManager = module.exports = function JobManager(options) {
_this.extraNoncePlaceholder,
options.recipients,
options.address,
options.poolHex,
options.coin
);
@ -157,6 +158,7 @@ var JobManager = module.exports = function JobManager(options) {
_this.extraNoncePlaceholder,
options.recipients,
options.address,
options.poolHex,
options.coin
);

View File

@ -19,7 +19,7 @@ const scriptFoundersCompile = address => bitcoin.script.compile([
let txHash
exports.txHash = () => txHash
exports.createGeneration = (blockHeight, blockReward, feeReward, recipients, poolAddress, coin, masternodeReward, masternodePayee, masternodePayment) => {
exports.createGeneration = (blockHeight, blockReward, feeReward, recipients, poolAddress, poolHex, coin, masternodeReward, masternodePayee, masternodePayment) => {
let poolAddrHash = bitcoin.address.fromBase58Check(poolAddress).hash
let tx = new bitcoin.Transaction()
@ -49,7 +49,7 @@ exports.createGeneration = (blockHeight, blockReward, feeReward, recipients, poo
new Buffer.concat([
serializedBlockHeight,
// Default z-nomp pool https://github.com/z-nomp/z-nomp/wiki/Insight-pool-link
Buffer('44656661756C74207A2D6E6F6D7020706F6F6C2068747470733A2F2F6769746875622E636F6D2F7A2D6E6F6D702F7A2D6E6F6D702F77696B692F496E73696768742D706F6F6C2D6C696E6B', 'hex')
Buffer(poolHex ? poolHex : '44656661756C74207A2D6E6F6D7020706F6F6C2068747470733A2F2F6769746875622E636F6D2F7A2D6E6F6D702F7A2D6E6F6D702F77696B692F496E73696768742D706F6F6C2D6C696E6B', 'hex')
])
)