aboutsummaryrefslogtreecommitdiffstats
path: root/createExceptions.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-12-16 16:14:59 -0800
committerAdam Soltys <[email protected]>2020-12-16 16:18:03 -0800
commitfb5e80c03086add9e94d8b66dccede2842292b90 (patch)
tree4e31e06f8d88865c6b141e77e4dcc86b0b915077 /createExceptions.js
parentacd24d0f735197d02df514125f014c71acc3592c (diff)
downloadcoinos-server-fb5e80c03086add9e94d8b66dccede2842292b90.tar.gz
coinos-server-fb5e80c03086add9e94d8b66dccede2842292b90.zip
script for checking uploads folder
Diffstat (limited to 'createExceptions.js')
-rw-r--r--createExceptions.js32
1 files changed, 0 insertions, 32 deletions
diff --git a/createExceptions.js b/createExceptions.js
deleted file mode 100644
index bec6ebc6..00000000
--- a/createExceptions.js
+++ /dev/null
@@ -1,32 +0,0 @@
-BitcoinCore = require("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();
- });
-})();