Skip to content

refactor: reuse ContentId generation - #44

Merged
0xkenta merged 2 commits into
mainfrom
refactor/content-id-generation
Sep 14, 2026
Merged

0xkenta merged 2 commits into
mainfrom
refactor/content-id-generation

Conversation

@0xkenta

@0xkenta 0xkenta commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Description

Notes & open questions

変更内容

  • Node::content_id の重複していたSHA-256ハッシュ処理を削除
  • 既存の ContentId::new を利用するようリファクタリング
  • 公開APIの戻り値 Result<Cid> は維持
  • 不要になった sha2 のimportを削除

検証

  • cargo test dasl::node を実行
  • 10件のテストがすべて成功

確認していただきたい部分

Ok(ContentId::new(&buf)?.0)

.0は良くない?

@0xkenta 0xkenta self-assigned this Sep 5, 2026

@somasekimoto somasekimoto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@0xkenta
0xkenta merged commit 460198d into main Sep 14, 2026
4 checks passed
@0xkenta
0xkenta deleted the refactor/content-id-generation branch September 14, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants