mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-10-17 05:21:27 +02:00
Small update to send all work to be done up to the Master thread. This should help deal with the fact that shares must be sent by one of the nodes that handles data.
This commit is contained in:
+4
-7
@@ -20,7 +20,7 @@ function Database() {
|
||||
function () {
|
||||
callback();
|
||||
});
|
||||
}, 32);
|
||||
}, 128);
|
||||
|
||||
this.storeShare = function (blockId, shareData) {
|
||||
let wsData = global.protos.WSData.encode({
|
||||
@@ -29,8 +29,7 @@ function Database() {
|
||||
msg: shareData,
|
||||
exInt: blockId
|
||||
});
|
||||
this.sendQueue.push({body: wsData}, function () {
|
||||
});
|
||||
process.send({type: 'sendRemote', body: wsData.toString('hex')});
|
||||
};
|
||||
|
||||
this.storeBlock = function (blockId, blockData) {
|
||||
@@ -40,8 +39,7 @@ function Database() {
|
||||
msg: blockData,
|
||||
exInt: blockId
|
||||
});
|
||||
this.sendQueue.push({body: wsData}, function () {
|
||||
});
|
||||
process.send({type: 'sendRemote', body: wsData.toString('hex')});
|
||||
};
|
||||
|
||||
this.storeInvalidShare = function (minerData) {
|
||||
@@ -51,8 +49,7 @@ function Database() {
|
||||
msg: minerData,
|
||||
exInt: 1
|
||||
});
|
||||
this.sendQueue.push({body: wsData}, function () {
|
||||
});
|
||||
process.send({type: 'sendRemote', body: wsData.toString('hex')});
|
||||
};
|
||||
|
||||
this.initEnv = function(){
|
||||
|
||||
Reference in New Issue
Block a user