diff --git a/README.md b/README.md index 6b1f6f6..8496c86 100644 --- a/README.md +++ b/README.md @@ -293,6 +293,7 @@ Listen to pool events 'data' object contains: job: 4, //stratum work job ID ip: '71.33.19.37', //ip address of client + port: 3333, //port of the client worker: 'matt.worker1', //stratum worker name height: 443795, //block height blockReward: 5000000000, //the number of satoshis received as payment for solving this block diff --git a/lib/jobManager.js b/lib/jobManager.js index f0f0972..b84d280 100644 --- a/lib/jobManager.js +++ b/lib/jobManager.js @@ -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){ _this.emit('share', { job: jobId, @@ -253,6 +253,7 @@ var JobManager = module.exports = function JobManager(options){ _this.emit('share', { job: jobId, ip: ipAddress, + port: port, worker: workerName, height: job.rpcData.height, blockReward: job.rpcData.coinbasevalue, diff --git a/lib/pool.js b/lib/pool.js index d9d7cf5..27fe28f 100644 --- a/lib/pool.js +++ b/lib/pool.js @@ -500,6 +500,7 @@ var pool = module.exports = function pool(options, authorizeFn){ params.nTime, params.nonce, client.remoteAddress, + client.socket.remotePort, params.name );