mirror of
https://github.com/Xahau/Validation-Ledger-Tx-Store-to-xPOP.git
synced 2025-11-20 11:45:51 +00:00
Stats: lastLedgerTx » lastServedTxLedger
This commit is contained in:
@@ -12,7 +12,7 @@ import { lastLedger } from '../lib/onLedger.mjs'
|
|||||||
import { txCount } from '../lib/onTransaction.mjs'
|
import { txCount } from '../lib/onTransaction.mjs'
|
||||||
|
|
||||||
const startDate = new Date()
|
const startDate = new Date()
|
||||||
let lastLedgerTx
|
let lastServedTxLedger
|
||||||
|
|
||||||
let wss // WebSocket Server
|
let wss // WebSocket Server
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ if (!wss) {
|
|||||||
},
|
},
|
||||||
stats: {
|
stats: {
|
||||||
lastLedger: lastLedger ?? null,
|
lastLedger: lastLedger ?? null,
|
||||||
lastLedgerTx: lastLedgerTx ?? null,
|
lastServedTxLedger: lastServedTxLedger ?? null,
|
||||||
txCount: txCount ?? null,
|
txCount: txCount ?? null,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -76,7 +76,7 @@ if (!wss) {
|
|||||||
res.json({
|
res.json({
|
||||||
uptime: new Date() - startDate,
|
uptime: new Date() - startDate,
|
||||||
lastLedger: lastLedger ?? null,
|
lastLedger: lastLedger ?? null,
|
||||||
lastLedgerTx: lastLedgerTx ?? null,
|
lastServedTxLedger: lastServedTxLedger ?? null,
|
||||||
txCount: txCount ?? null,
|
txCount: txCount ?? null,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -141,7 +141,7 @@ const emit = _data => {
|
|||||||
data.xpop.blob = undefined
|
data.xpop.blob = undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
lastLedgerTx = data.origin.ledgerIndex
|
lastServedTxLedger = data.origin.ledgerIndex
|
||||||
|
|
||||||
if (account === '' || data.account === account) {
|
if (account === '' || data.account === account) {
|
||||||
client.send(JSON.stringify(data), { binary: false })
|
client.send(JSON.stringify(data), { binary: false })
|
||||||
|
|||||||
Reference in New Issue
Block a user