mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-10-17 05:21:27 +02:00
Update to keep the pool from repeatedly hammering the BT check.
This commit is contained in:
committed by
Alexander Blair
parent
ef7bfbac3f
commit
cd61a82240
+6
-3
@@ -536,8 +536,11 @@ function Database(){
|
||||
// Hopping into async, we need the current block height to know where to start our indexing...
|
||||
async.waterfall([
|
||||
function(callback){
|
||||
global.coinFuncs.getLastBlockHeader(function(body){
|
||||
callback(null, body.height, Math.floor(body.difficulty * 1.5 * global.config.pplns.shareMultiLog));
|
||||
global.coinFuncs.getLastBlockHeader(function(err, body){
|
||||
if (err) {
|
||||
return callback(true, body);
|
||||
}
|
||||
return callback(null, body.height, Math.floor(body.difficulty * 1.5 * global.config.pplns.shareMultiLog));
|
||||
});
|
||||
},
|
||||
function (lastBlock, difficulty, callback) {
|
||||
@@ -586,7 +589,7 @@ function Database(){
|
||||
callback(null, blockList);
|
||||
}
|
||||
], function(err, data){
|
||||
if (global.config.general.blockCleaner === true){
|
||||
if (err === null && global.config.general.blockCleaner === true){
|
||||
if(data.length > 0){
|
||||
global.database.refreshEnv();
|
||||
let blockList = global.database.getBlockList();
|
||||
|
||||
Reference in New Issue
Block a user