Added port to share emitter

This commit is contained in:
Matt 2014-05-09 16:43:53 -06:00
parent de1c8c018b
commit eb4b62e9c4
3 changed files with 4 additions and 1 deletions

View File

@ -293,6 +293,7 @@ Listen to pool events
'data' object contains: 'data' object contains:
job: 4, //stratum work job ID job: 4, //stratum work job ID
ip: '71.33.19.37', //ip address of client ip: '71.33.19.37', //ip address of client
port: 3333, //port of the client
worker: 'matt.worker1', //stratum worker name worker: 'matt.worker1', //stratum worker name
height: 443795, //block height height: 443795, //block height
blockReward: 5000000000, //the number of satoshis received as payment for solving this block blockReward: 5000000000, //the number of satoshis received as payment for solving this block

View File

@ -165,7 +165,7 @@ var JobManager = module.exports = function JobManager(options){
}; };
this.processShare = function(jobId, previousDifficulty, difficulty, extraNonce1, extraNonce2, nTime, nonce, ipAddress, workerName){ this.processShare = function(jobId, previousDifficulty, difficulty, extraNonce1, extraNonce2, nTime, nonce, ipAddress, port, workerName){
var shareError = function(error){ var shareError = function(error){
_this.emit('share', { _this.emit('share', {
job: jobId, job: jobId,
@ -253,6 +253,7 @@ var JobManager = module.exports = function JobManager(options){
_this.emit('share', { _this.emit('share', {
job: jobId, job: jobId,
ip: ipAddress, ip: ipAddress,
port: port,
worker: workerName, worker: workerName,
height: job.rpcData.height, height: job.rpcData.height,
blockReward: job.rpcData.coinbasevalue, blockReward: job.rpcData.coinbasevalue,

View File

@ -500,6 +500,7 @@ var pool = module.exports = function pool(options, authorizeFn){
params.nTime, params.nTime,
params.nonce, params.nonce,
client.remoteAddress, client.remoteAddress,
client.socket.remotePort,
params.name params.name
); );