Skip to content

Commit

Permalink
[ioctl] fix verbose flag (#4014)
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinxie authored Dec 15, 2023
1 parent 4f6d4e5 commit 289cf02
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ioctl/cmd/bc/bcblock.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

var (
_verbose bool
verbose bool
)

// Multi-language support
Expand All @@ -34,8 +34,8 @@ var (
config.Chinese: "获取IoTeX区块链中的区块",
}
_bcBlockCmdUses = map[config.Language]string{
config.English: "block [HEIGHT|HASH] [--_verbose]",
config.Chinese: "block [高度|哈希] [--_verbose]",
config.English: "block [HEIGHT|HASH] [--verbose]",
config.Chinese: "block [高度|哈希] [--verbose]",
}
_flagVerboseUsage = map[config.Language]string{
config.English: "returns block info and all actions within this block.",
Expand All @@ -56,7 +56,7 @@ var _bcBlockCmd = &cobra.Command{
}

func init() {
_bcBlockCmd.Flags().BoolVar(&_verbose, "_verbose", false, config.TranslateInLang(_flagVerboseUsage, config.UILanguage))
_bcBlockCmd.Flags().BoolVar(&verbose, "verbose", false, config.TranslateInLang(_flagVerboseUsage, config.UILanguage))
}

type blockMessage struct {
Expand Down Expand Up @@ -158,7 +158,7 @@ func getBlock(args []string) error {
Node: config.ReadConfig.Endpoint,
Block: blockMeta,
}
if _verbose {
if verbose {
blocksInfos, err = getActionInfoWithinBlock(blockMeta.Height)
if err != nil {
return output.NewError(0, "failed to get actions info", err)
Expand Down

0 comments on commit 289cf02

Please sign in to comment.