mirror of
https://github.com/tornadocash/tornado-relayer.git
synced 2025-07-23 23:11:21 -04:00
add latest block
This commit is contained in:
parent
1ac1b6c5ce
commit
3d718bb9a3
1 changed files with 9 additions and 1 deletions
10
src/index.js
10
src/index.js
|
@ -37,8 +37,15 @@ app.get('/', function (req, res) {
|
|||
res.send('This is <a href=https://tornado.cash>tornado.cash</a> Relayer service. Check the <a href=/status>/status</a> for settings')
|
||||
})
|
||||
|
||||
|
||||
app.get('/status', async function (req, res) {
|
||||
let nonce = await redisClient.get('nonce')
|
||||
let latestBlock = null
|
||||
try {
|
||||
latestBlock = await web3.eth.getBlockNumber()
|
||||
} catch(e) {
|
||||
console.error('Problem with RPC', e)
|
||||
}
|
||||
const { ethPrices } = fetcher
|
||||
res.json({
|
||||
relayerAddress: web3.eth.defaultAccount,
|
||||
|
@ -48,7 +55,8 @@ app.get('/status', async function (req, res) {
|
|||
ethPrices,
|
||||
relayerServiceFee,
|
||||
nonce,
|
||||
version
|
||||
version,
|
||||
latestBlock
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue