mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-10-24 06:28:35 +02:00
Slow down some of the network updates.
This commit is contained in:
+3
-1
@@ -8,6 +8,7 @@ const sock = zmq.socket('pub');
|
||||
let threadName = "Worker Server ";
|
||||
let cycleCount = 0;
|
||||
sock.bindSync('tcp://127.0.0.1:3000');
|
||||
let lastBlockHash = null;
|
||||
|
||||
function updateShareStats() {
|
||||
// This is an omni-worker to deal with all things share-stats related
|
||||
@@ -432,7 +433,8 @@ function updatePoolInformation() {
|
||||
|
||||
function updateBlockHeader() {
|
||||
global.support.rpcDaemon('getlastblockheader', [], function (body) {
|
||||
if (body.result) {
|
||||
if (body.result && body.result.block_header.hash !== lastBlockHash) {
|
||||
lastBlockHash = body.result.block_header.hash;
|
||||
global.database.setCache('networkBlockInfo', {
|
||||
difficulty: body.result.block_header.difficulty,
|
||||
hash: body.result.block_header.hash,
|
||||
|
||||
Reference in New Issue
Block a user