Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Fix oasis network show [entity id hash]

未关闭
#707 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
go
领域
blockchain, cli

调研方向

从 cmd/network/show.go 中引用的 status 和 pretty-print 处理开始,然后阅读 registry.Backend.GetNode 和 GetNodeStatus 的行为。使用已过期的节点描述符和其他查找错误测试 network show 入口点;完成标准是两个 status 都能独立报告,且不会出现误导性的提前返回或错误输出。

由索引模型根据 Issue 内容生成。

描述

Fix https://github.com/oasisprotocol/cli/blob/7e8b7e032cecb47a2f3f00b0b23cae0b92a40dd3/cmd/network/show.go#L46

For additional context see https://github.com/oasisprotocol/cli/pull/706#discussion_r3544676120.

Problems

  1. Status / pretty print should never return eagerly as they are used for debugging.
  2. Misleading output as error can also happen because of other reasons: https://github.com/oasisprotocol/cli/blob/7e8b7e032cecb47a2f3f00b0b23cae0b92a40dd3/cmd/network/show.go#L98
  3. registry.Backend.GetNode return registry.NoSuchError as soon as the node descriptor has expired, however descriptor actually stays, just like registry.Backend.GetNodeStatus still returns until debonding period expires.

Solution

Probably best to use switch for both statuses and print them independently (currently we mix them).

主要语言
Go
星标
80
派生
23
平均合并
59 分钟
30 天内合并 PR
1

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

oasisprotocol/cli 的其他 Issue

查看 oasisprotocol/cli 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。