Add new setting to determine how many blocks to sync before saving stats

This commit is contained in:
joeuhren
2020-12-08 20:49:06 -07:00
parent 4240178255
commit 120947fe42
4 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -808,7 +808,7 @@ module.exports = {
blocks_to_scan.push(i);
}
async.eachLimit(blocks_to_scan, task_limit_blocks, function(block_height, next_block) {
if (block_height % 5000 === 0) {
if (block_height % settings.save_stats_after_sync_blocks === 0) {
Stats.updateOne({coin: coin}, {
last: block_height - 1,
txes: txes,