From 9c641aca00451ad09234dc2e4ea2189508a30dcf Mon Sep 17 00:00:00 2001 From: Alexander Blair Date: Fri, 1 Sep 2017 12:09:44 -0700 Subject: [PATCH] Putting a check in for over-large payment intervals. Fixes/Closes #99 --- lib/payments.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/payments.js b/lib/payments.js index cada6da..39cd88c 100644 --- a/lib/payments.js +++ b/lib/payments.js @@ -347,7 +347,11 @@ let paymentQueue = async.queue(function (paymentDetails, callback) { paymentQueue.drain = function(){ extraPaymentRound = false; - paymentTimer = setInterval(makePayments, global.config.payout.timer * 60 * 1000); + if (global.config.payout.timer > 35791){ + console.error("Payout timer is too high. Please use a value under 35791 to avoid overflows."); + } else { + paymentTimer = setInterval(makePayments, global.config.payout.timer * 60 * 1000); + } global.database.setCache('lastPaymentCycle', Math.floor(Date.now()/1000)); sock.send(['payments', 'complete']); }; @@ -685,10 +689,6 @@ function init() { setInterval(updateShapeshiftCompletion, 90000); setInterval(determineBestExchange, 60000); } - setInterval(function () { - global.support.rpcWallet("sweep_dust", [], function () { - }); - }, 86400000 * 3); setInterval(function () { global.support.rpcWallet("store", [], function () { });