From c79ef979c0fd0f885006c50d36f06f82bb4f00f5 Mon Sep 17 00:00:00 2001 From: Wietse Wind Date: Sat, 7 Oct 2023 02:06:18 +0200 Subject: [PATCH] Stats better fieldname --- bin/webserver.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/webserver.mjs b/bin/webserver.mjs index 710895a..aa497af 100644 --- a/bin/webserver.mjs +++ b/bin/webserver.mjs @@ -12,7 +12,7 @@ import { lastLedger } from '../lib/onLedger.mjs' import { txCount } from '../lib/onTransaction.mjs' const startDate = new Date() -let lastServedTxLedger +let lastWsPushedLedger let wss // WebSocket Server @@ -60,7 +60,7 @@ if (!wss) { }, stats: { lastLedger: lastLedger ?? null, - lastServedTxLedger: lastServedTxLedger ?? null, + lastWsPushedLedger: lastWsPushedLedger ?? null, txCount: txCount ?? null, }, }) @@ -76,7 +76,7 @@ if (!wss) { res.json({ uptime: new Date() - startDate, lastLedger: lastLedger ?? null, - lastServedTxLedger: lastServedTxLedger ?? null, + lastWsPushedLedger: lastWsPushedLedger ?? null, txCount: txCount ?? null, }) }) @@ -141,7 +141,7 @@ const emit = _data => { data.xpop.blob = undefined } - lastServedTxLedger = data.origin.ledgerIndex + lastWsPushedLedger = data.origin.ledgerIndex if (account === '' || data.account === account) { client.send(JSON.stringify(data), { binary: false })