From 3161dd7ee95b6c7d70f8341298dd4fab84cda8b0 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 2 Sep 2022 14:47:08 -0700 Subject: es6 migration --- scripts/createExceptions.js | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 scripts/createExceptions.js (limited to 'scripts/createExceptions.js') diff --git a/scripts/createExceptions.js b/scripts/createExceptions.js deleted file mode 100644 index 26baeb7e..00000000 --- a/scripts/createExceptions.js +++ /dev/null @@ -1,32 +0,0 @@ -BitcoinCore = require("@asoltys/bitcoin-core"); -fs = require("fs"); -config = require("./config"); -bc = new BitcoinCore(config.bitcoin); -l = require("pino")(); -require("./db"); - -console.log(db.Payment); - -(async () => { - payments = ( - await db.Payment.findAll({ - attributes: ["hash"], - }) - ).map((p) => p.hash); - const transactions = await bc.listTransactions("*", 1000); - var stream = fs.createWriteStream("exceptions", { - flags: "a", - emitClose: true, - }); - transactions.map((tx) => { - if (!payments.includes(tx.txid)) { - l.info("writing", tx.txid); - stream.write(tx.txid + "\n"); - } - }); - stream.end(); - stream.on("close", () => { - l.info("done"); - process.exit(); - }); -})(); -- cgit v1.2.3