Skip to content

Commit

Permalink
update mempool descriptions and add json support to status (#5221)
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-if committed Aug 13, 2024
1 parent e734cc5 commit f6b5886
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions ironfish-cli/src/commands/mempool/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,32 @@ import { GetMempoolStatusResponse } from '@ironfish/sdk'
import { Flags } from '@oclif/core'
import blessed from 'blessed'
import { IronfishCommand } from '../../command'
import { RemoteFlags } from '../../flags'
import { JsonFlags, RemoteFlags } from '../../flags'
import * as ui from '../../ui'

export default class Status extends IronfishCommand {
static description = 'Show the status of the Mempool'
static description = "show the mempool's status"
static enableJsonFlag = true

static flags = {
...RemoteFlags,
...JsonFlags,
follow: Flags.boolean({
char: 'f',
default: false,
description: 'Follow the status of the mempool live',
}),
}

async start(): Promise<void> {
async start(): Promise<unknown> {
const { flags } = await this.parse(Status)

if (!flags.follow) {
const client = await this.connectRpc()
const response = await client.mempool.getMempoolStatus()
this.log(renderStatus(response.content))
this.exit(0)

return response.content
}

// Console log will create display issues with Blessed
Expand Down
2 changes: 1 addition & 1 deletion ironfish-cli/src/commands/mempool/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const parseMinMax = (input: string): MinMax | undefined => {
}

export class TransactionsCommand extends IronfishCommand {
static description = `List transactions in the mempool`
static description = `list mempool transactions`

static flags = {
...RemoteFlags,
Expand Down

0 comments on commit f6b5886

Please sign in to comment.