Fixed tx was removed during merge
This commit is contained in:
parent
a4ba169300
commit
b85f78ef09
13
lib/pool.js
13
lib/pool.js
@ -155,8 +155,9 @@ var pool = module.exports = function pool(options, authorizeFn){
|
||||
emitShare();
|
||||
else{
|
||||
SubmitBlock(blockHex, function(){
|
||||
CheckBlockAccepted(shareData.solution, function(isAccepted){
|
||||
CheckBlockAccepted(shareData.solution, function(isAccepted, tx){
|
||||
isValidBlock = isAccepted;
|
||||
shareData.tx = tx;
|
||||
emitShare();
|
||||
});
|
||||
});
|
||||
@ -428,9 +429,13 @@ var pool = module.exports = function pool(options, authorizeFn){
|
||||
_this.daemon.cmd('getblock',
|
||||
[blockHash],
|
||||
function(results){
|
||||
if (results.filter(function(result){return result.response &&
|
||||
(result.response.hash === blockHash)}).length >= 1){
|
||||
callback(true);
|
||||
var validResults = results.filter(function(result){
|
||||
return result.response && (result.response.hash === blockHash)
|
||||
});
|
||||
|
||||
if (validResults.length >= 1){
|
||||
console.dir(validResults);
|
||||
callback(true, validResults[0].response.tx[0]);
|
||||
}
|
||||
else{
|
||||
callback(false);
|
||||
|
||||
@ -337,7 +337,6 @@ var StratumServer = exports.Server = function StratumServer(ports, connectionTim
|
||||
stratumClients[subscriptionId] = client;
|
||||
_this.emit('client.connected', client);
|
||||
client.on('socketDisconnect', function() {
|
||||
console.log("Socket disconnected for: "+client);
|
||||
_this.removeStratumClientBySubId(subscriptionId);
|
||||
_this.emit('client.disconnected', client);
|
||||
}).on('ban', function(ipAddress){
|
||||
|
||||
@ -69,7 +69,7 @@ var varDiff = module.exports = function varDiff(port, varDiffOptions){
|
||||
if (stratumPort != port) {
|
||||
console.error("Handling a client which is not of this vardiff?");
|
||||
}
|
||||
var options = varDiffOptions
|
||||
var options = varDiffOptions;
|
||||
|
||||
var lastTs;
|
||||
var lastRtc;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user