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:
parent
25904d97af
commit
e5abc7d3de
|
@ -14,6 +14,7 @@ var BlockTemplate = module.exports = function BlockTemplate(
|
||||||
extraNoncePlaceholder,
|
extraNoncePlaceholder,
|
||||||
recipients,
|
recipients,
|
||||||
poolAddress,
|
poolAddress,
|
||||||
|
poolHex,
|
||||||
coin
|
coin
|
||||||
) {
|
) {
|
||||||
//private members
|
//private members
|
||||||
|
@ -61,6 +62,7 @@ var BlockTemplate = module.exports = function BlockTemplate(
|
||||||
this.rewardFees,
|
this.rewardFees,
|
||||||
recipients,
|
recipients,
|
||||||
poolAddress,
|
poolAddress,
|
||||||
|
poolHex,
|
||||||
coin,
|
coin,
|
||||||
masternodeReward,
|
masternodeReward,
|
||||||
masternodePayee,
|
masternodePayee,
|
||||||
|
|
|
@ -123,6 +123,7 @@ var JobManager = module.exports = function JobManager(options) {
|
||||||
_this.extraNoncePlaceholder,
|
_this.extraNoncePlaceholder,
|
||||||
options.recipients,
|
options.recipients,
|
||||||
options.address,
|
options.address,
|
||||||
|
options.poolHex,
|
||||||
options.coin
|
options.coin
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -157,6 +158,7 @@ var JobManager = module.exports = function JobManager(options) {
|
||||||
_this.extraNoncePlaceholder,
|
_this.extraNoncePlaceholder,
|
||||||
options.recipients,
|
options.recipients,
|
||||||
options.address,
|
options.address,
|
||||||
|
options.poolHex,
|
||||||
options.coin
|
options.coin
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ const scriptFoundersCompile = address => bitcoin.script.compile([
|
||||||
let txHash
|
let txHash
|
||||||
exports.txHash = () => 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 poolAddrHash = bitcoin.address.fromBase58Check(poolAddress).hash
|
||||||
let tx = new bitcoin.Transaction()
|
let tx = new bitcoin.Transaction()
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ exports.createGeneration = (blockHeight, blockReward, feeReward, recipients, poo
|
||||||
new Buffer.concat([
|
new Buffer.concat([
|
||||||
serializedBlockHeight,
|
serializedBlockHeight,
|
||||||
// Default z-nomp pool https://github.com/z-nomp/z-nomp/wiki/Insight-pool-link
|
// Default z-nomp pool https://github.com/z-nomp/z-nomp/wiki/Insight-pool-link
|
||||||
Buffer('44656661756C74207A2D6E6F6D7020706F6F6C2068747470733A2F2F6769746875622E636F6D2F7A2D6E6F6D702F7A2D6E6F6D702F77696B692F496E73696768742D706F6F6C2D6C696E6B', 'hex')
|
Buffer(poolHex ? poolHex : '44656661756C74207A2D6E6F6D7020706F6F6C2068747470733A2F2F6769746875622E636F6D2F7A2D6E6F6D702F7A2D6E6F6D702F77696B692F496E73696768742D706F6F6C2D6C696E6B', 'hex')
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue