Commit f6eb360c authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] add `current` command: shows current block

parent 4975240e
......@@ -61,6 +61,22 @@ module.exports = {
cli: [{
name: 'current',
desc: 'Shows current block\'s blockstamp',
logs: false,
preventIfRunning: true,
onDatabaseExecute: async (server:Server) => {
const current = await server.dal.getCurrentBlockOrNull()
if (!current) {
return console.log('None')
const blockstamp = `${current.number}-${current.hash}`
// Save DB
await server.disconnect();
}, {
name: 'dump [what] [name] [cond]',
desc: 'Dumps data of the blockchain.',
logs: false,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment