aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--index.js2
-rw-r--r--routes/liquid/receive.js2
-rw-r--r--routes/payments.js8
3 files changed, 8 insertions, 4 deletions
diff --git a/index.js b/index.js
index e535b16f..c006e1ea 100644
--- a/index.js
+++ b/index.js
@@ -107,7 +107,7 @@ app.use((err, req, res, next) => {
if (req.user) details.username = req.user.username;
- l.error("Error: ", details);
+ l.error("uncaught error: ", JSON.stringify(details));
res.status(500);
res.set({
"Cache-Control": "no-cache"
diff --git a/routes/liquid/receive.js b/routes/liquid/receive.js
index 5d41c269..8e1d97fe 100644
--- a/routes/liquid/receive.js
+++ b/routes/liquid/receive.js
@@ -75,7 +75,7 @@ zmqRawTx.on("message", async (topic, message, sequence) => {
tx = await lq.decodeRawTransaction(unblinded.hex);
blinded = await lq.decodeRawTransaction(hex);
} catch (e) {
- return console.log(e);
+ return l.error("problem decoding liquid tx", e.message);
}
if (payments.includes(blinded.txid)) return;
diff --git a/routes/payments.js b/routes/payments.js
index efe178b3..b3ab7ef4 100644
--- a/routes/payments.js
+++ b/routes/payments.js
@@ -57,6 +57,7 @@ ah(async () => {
).map(p => p.hash);
const sanity = async () => {
+ try {
let { invoices } = await lnp.listInvoices({
reversed: true,
num_max_invoices: 1000
@@ -163,8 +164,11 @@ ah(async () => {
if (unaccounted.length)
l.warn("wallet transactions missing from database", unaccounted);
- // let s = fs.createWriteStream("exceptions", { flags: "a" });
- // unaccounted.map(tx => s.write(tx + "\n"));
+ //let s = fs.createWriteStream("exceptions", { flags: "a" });
+ //unaccounted.map(tx => s.write(tx + "\n"));
+ } catch(e) {
+ l.error("sanity check failed", e.message);
+ }
};
setTimeout(sanity, 5000);