diff options
Diffstat (limited to 'routes/bitcoin')
| -rw-r--r-- | routes/bitcoin/receive.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/routes/bitcoin/receive.js b/routes/bitcoin/receive.js index 603db47b..d9274935 100644 --- a/routes/bitcoin/receive.js +++ b/routes/bitcoin/receive.js @@ -126,16 +126,16 @@ zmqRawTx.on("message", async (topic, message, sequence) => { }); zmqRawBlock.on("message", async (topic, message, sequence) => { - const payments = await db.Payment.findAll({ - where: { confirmed: false }, - }); + const payments = await db.Payment.findAll({ + where: { confirmed: false }, + }); - let block = bitcoin.Block.fromHex(message.toString("hex")); - block.transactions.map((tx) => { - let hash = reverse(tx.getHash()).toString("hex"); - if (payments.find((p) => p.hash === hash)) queue[hash] = 1; - }); + let block = bitcoin.Block.fromHex(message.toString("hex")); + block.transactions.map((tx) => { + let hash = reverse(tx.getHash()).toString("hex"); + if (payments.find((p) => p.hash === hash)) queue[hash] = 1; }); +}); setInterval(async () => { try { |
