aboutsummaryrefslogtreecommitdiffstats
path: root/lib/payments.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/payments.js')
-rw-r--r--lib/payments.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/payments.js b/lib/payments.js
index 1c8345f1..e9f634e2 100644
--- a/lib/payments.js
+++ b/lib/payments.js
@@ -400,9 +400,10 @@ export let build = async ({ amount, address, feeRate }, user) => {
return { feeRate, ourfee, fee, fees, hex: tx.hex };
};
-let seen = await db.sMembers("missing");
-let catchUp = async () => {
+let seen;
+export let catchUp = async () => {
try {
+ if (!seen) seen = await db.sMembers("missing");
let txns = [];
for (let [type, n] of Object.entries({ bitcoin: bc, liquid: lq })) {
txns.push(
@@ -432,4 +433,3 @@ let catchUp = async () => {
setTimeout(catchUp, 2000);
};
-catchUp();